Edit: Oops! I ignored something that might be important in the first post. The line 6 shown there is not an acceptable way to declare main(). You must have a return type for main (it should be int). I expect that is just an artifact of cutting out and posting incomplete code, in which case the rest of what I said below is still valid. But if you actually declared main() incorrectly, fix that and then see what error messages change.
Quote:
Originally Posted by Sergei Steshenko
I.e. no errors/warnings. Probably my code is quite wrong, I don't know.
|
Your code is OK and it is further confirmation that the portion of code posted by AmuthaA is not the portion of code with the actual problem.
Quote:
Originally Posted by johnsfine
Do you have a small entire compilation unit (something someone else could compile and duplicate your result) that shows this problem?
The error message you quoted looks unlikely for the code you posted.
|
Quote:
Originally Posted by AmuthaA
i am using GCC4.4. Is there any solution to resolve the problem.
|
Ignoring all replies and asking again for help while providing no new information is not a good plan for actually getting help.
Since it appears you haven't posted the code with the actual problem, no one can tell you what to correct.
If you really think the problem is the compiler version, copy the full module source code that Sergei posted and compile it with your version of gcc. If it fails then that supports the idea it is something in your compiler version. If it succeeds, that proves the problem is in part of your source code that you haven't shown us yet (because Segei's lines 24 through 36 are the same as the partial source code you posted).