![]() |
Variables inexlicably flagged as undeclared
I have several classes all of which show the same problem when they compile - "undeclared variable". Needless to say all the variables are, as far as I can tell, declared. The one pattern I seem to be able to find is that the compiler only complains when they are used as parameters. Otherwise the compiler recognizes them.
I won't bore you with the entire code, here's a sample. Code:
#pragma onceHere's one more Code:
Dictionary::Dictionary(string module, USHORT rsc_id){What's the cause of these errors. They're driving me nuts. |
Re: Variables inexlicably flagged as undeclared
I see about ten posts a day, by the uninitiated, claiming that they have found bugs in the language. Most of them, like you, can't even explain why the unexpected behavior even seems like a bug.
You haven't explained diddly-squat, other than the fact that your use of the language has failed to provide you with a sugar-tit at the time of the day that you are most accomsted to receive one. Would you care to expand upon that, in some sort of meaningful detail, or would you just like us to pat you on the butt and have us tell you what a good big boy you are. We are quite likely to assign the latter chore to your mama. Most error messages telling you that you have failed to declare a variable mean exactly that. They are not being abstruse just to eff you up. Did you think of that? Inquiring minds want to know. I won't bore you with details, they can't possibly be important. |
Re: Variables inexlicably flagged as undeclared
Quote:
|
Re: Variables inexlicably flagged as undeclared
My compiler is perfect. It recognizesd all the functions and does not say I''m passing the wrong parameters. All it says is that the identifier I'm passing is undeclared. As you can see in the posted code, I do seem to have declared them.
DaWei, I haven't the faintest idea what you're talking about. Who mentioned bugs? |
Re: Variables inexlicably flagged as undeclared
I found the problem. A variable in the first file to be preprocessed was declared as a nonexistent type, messing up all the variables after it.
|
| All times are GMT +5.5. The time now is 12:09. |