?
Solved

Location of variables declaration

Posted on 2004-08-06
2
Medium Priority
?
214 Views
Last Modified: 2010-04-01
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
Comment
Question by:shubha_mohan
2 Comments
 
LVL 15

Accepted Solution

by:
efn earned 200 total points
ID: 11737059
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
 

Author Comment

by:shubha_mohan
ID: 11737111
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

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question