Location of variables declaration

I facing a very funny problem in VC++ ..  I am not being able to declare variables whereever i like. Like in C, it insists that i declare variables in the beginning of the function..cud anyone guess the reason ??
Who is Participating?
efnConnect With a Mentor Commented:
If the name of the file ends in ".c", it will compile it as C.  That's all I can think of.  Maybe if you show a sample and the error message, someone may be able to help more.
shubha_mohanAuthor Commented:
I did think of that and the files are C++. And there are no specific error messages..Just that those variables appear undefined yet.. Thanks anyway !!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.