• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 219
  • Last Modified:

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 ??
0
shubha_mohan
Asked:
shubha_mohan
1 Solution
 
efnCommented:
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.
0
 
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 !!
0
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.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now