Solved

Location of variables declaration

Posted on 2004-08-06
2
205 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
efn earned 50 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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.

730 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