8 Topics

Member Avatar for
Member Avatar for ParPau

Have first part of program written. It will use enum array for month and average rainfall amount. It starts at January and runs through December. Second part is to ask user at what month they want to start (example, April). The printout would then start at April of year -1 …

Member Avatar for jwenting
0
261
Member Avatar for Labdabeta

I need to know which of these three copies of code is considered best. I also need to which one is more efficient memory wise and which is more efficient time wise. Thanks: enums [CODE]enum MyEnum{EnumTypeOne=1,EnumTypeTwo=2,EnumTypeThree=4,EnumTypeFour=8};[/CODE] macros [CODE]#define EnumTypeOne 1 #define EnumTypeTwo 2 #define EnumTypeThree 4 #define EnumTypeFour 8 typedef …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for mesbahuk

I have a Java code block like following: Vector<NameAddress> route = dialog.getRoute(); for ( Enumeration<NameAddress> e = route.elements(); e.hasMoreElements(); ) { // some more to copy route to another Vector<> } I am trying to convert it in C# and here is my code: List<NameAddress> route = dialog.getRoute(); for ( …

Member Avatar for C#Jaap
0
298
Member Avatar for amvx86

Hello all, I am trying to get a bunch of sub-keys and values from the registry in vb 2010 and i remember in vb6 this was quite easy. Can anyone share code to help? Or a link where I can go? I've been searching for nearly 8 hours on line …

Member Avatar for amvx86
0
2K
Member Avatar for IndianaRonaldo

Hi all, I am just going through C++ basics now and I read that enum types cannot be input directly with cout and cin and such.And also that type coercion from int to enum is not allowed.But when i do this, [CODE] enum SumEnum{ENUM1,ENUM2,ENUM3} SumEnum VarEnum; scanf("%d",&VarEnum); printf("%d",VarEnum); [/CODE] It …

Member Avatar for Tumlee
0
1K
Member Avatar for iamthesgt

I am working on a VideoServer for my company, and in making the cgi files for the Web interface, I came across the following error: " invalid conversion from ‘int’ to ‘VideoOutputMode‘ " This was from line 4 of the below code, in the WebInterface file: [CODE]form_iterator vout_mode = formData.getElement("DisplaySettingsVOutMode"); …

Member Avatar for iamthesgt
0
3K
Member Avatar for crapgarden

Here's a defined enumeration: enum shipCost {FIGHTER_COST = 25, BOMBER_COST, CRUISER_COST = 50}; Then they do this which I don't understand: shipCost myShipCost = BOMBER_COST; My question is why don't you just do the following instead? int myShipCost = BOMBER_COST;

Member Avatar for crapgarden
0
153
Member Avatar for superchica08

hello I have done this program that prompts the user to input the length of the sides of a triangle and outputs the shape of the triangle. Using an enumeration type, triangleType, that has the values scalene, isosceles, equilateral, and notTriangle. so the problem i ma having with the program …

Member Avatar for superchica08
0
237

The End.