User Profile
Collapse
-
You say each member is initialized by calling its constructor. OK, initialized to what? To whatever the constructor feels like? LOL. I mean if no user defined constructor is provided then where are the initializing values coming from? -
Read this about the need for prototypes. Read mark_poc's response:
https://answers.yahoo.com/question/i...4193724AAbb3Lo...Leave a comment:
-
Actually, string.h doesn't contain the functions themselves, it only contains the prototypes of those functions. The functions themselves reside in the library, and are linked to the program by the linker. But because those functions are being called before they are linked in, the compiler needs to know about them and the header files provide the basic information about them.
You can put anything in a header file that you want - it just...Leave a comment:
-
Just pointing this out: for(x=-3.5;x=3;x=x+0.5)
With x being assigned 3, then the condition for the loop will always equal TRUE and will never end.Leave a comment:
-
Well I simply placed int in front of main() like this:
int main()
I was able to compile your program and it ran fine. It said that 5 US dollars are equal to 6000 Iraqi Dinar.
Make sure you are not capitalizing anything, like Int. Make sure it is lower case.Leave a comment:
-
The main() function should have an int return type, lie this:
int main()
Other languages may let you omit the return type and then just assume it to be type int. However, C++ doesn't do that - you must specify the return type for all functions.Leave a comment:
No activity results to display
Show More
Leave a comment: