![]() |
|
#1
|
|||
|
|||
Error C1004Hello everyone,
I am beginner and I hope someone could help me finding what is the error in my code ... there are two errors ...
CPP / C++ / C Code:
|
|||
|
#2
|
|||
|
|||
Re: Error C1004Quote:
Code:
CPP / C++ / C Code:
After this correction I get: Code:
Now, with errors it's usually the best idea to start from the top, because simple errors in the early stage of the program can cause weird error messages in the later parts. To prevent cases like this your compiler might have an option called "fatal errors" or something. Turning this option on will cause the compiler to abort at the first error message. If you look at the first message, it clearly says (this time) what is wrong: CPP / C++ / C Code:
Let's try again with this change: Code:
Well what do you know, the weird error about undeclared grades vanished. There's still one error though, an undeclared sguare. Clearly, this is a typo. After correcting it to square: Code:
Now the code compiles. It's a good idea to set your compiler's warning levels high. It let's you catch things like this. CPP / C++ / C Code:
Clearly you meant to have ++counter. After this it compiles cleanly. |
|
#3
|
|||
|
|||
Re: Error C1004Thank you very much ... really I appreciate your help ..
I think I should practice more to avoid this kind of mistake thank you again ... |
Recent GIDBlog
Vista ?Widgets? on Windows XP by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The