By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,661 Members | 1,311 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,661 IT Pros & Developers. It's quick & easy.

nowcomer to VS 2003 - help required with c++ environment

P: n/a
Hi, I have installed VS2003 and have been wroting some c++ code. Mainly
created a win32 console application for my c++ program. I have a few
questions:

1. Is there a menu to compile/build/execute that I can put in the menu bar
instead of pressing F5?

2. My DOS window vanishes after i press F5. I instead press Ctrl-F5 and the
DOS window remains visible. But i dislike having to make this physical
stretch with my fingers when i need to rerun the application. What else can
i do to render the output visible? It doesnt have to be a DOS output.

3. I seem to have to always include: #include "stdafx.h" in all my .cpp
files. If i dont I get the following error:

ga.cpp(77): fatal error C1010: unexpected end of file while looking for
precompiled header directive

Is there any way of not having to include stdafx.h?

4. Any good web resources that can get me up to speed with VS2003 and the
C++ environment i.e. tutorials on debugging . solution explorer, tools,
resource view etc etc?

Many thanks!
tjones
Nov 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Please see responses in context:

"tjones" <tj****@nospam.com> wrote in message
news:ug**************@TK2MSFTNGP10.phx.gbl...
Hi, I have installed VS2003 and have been wroting some c++ code. Mainly
created a win32 console application for my c++ program. I have a few
questions:

1. Is there a menu to compile/build/execute that I can put in the menu bar
instead of pressing F5? You don't have the Build and Debug menues? They include everything you need.
2. My DOS window vanishes after i press F5. I instead press Ctrl-F5 and the DOS window remains visible. But i dislike having to make this physical
stretch with my fingers when i need to rerun the application. What else can i do to render the output visible? It doesnt have to be a DOS output. Aside from the kludge of making a cin.get() call the last statement in your
program, thus pausing the program before exit, I know of no way.
3. I seem to have to always include: #include "stdafx.h" in all my .cpp
files. If i dont I get the following error:

ga.cpp(77): fatal error C1010: unexpected end of file while looking for
precompiled header directive

Is there any way of not having to include stdafx.h? Not necessary if you create an empty project as follows:
Select Win 32 Project or Win 32 Console Project as you template, then in
Project Settings, be sure that Console Project and Empty Project are
selected. Once the empty project is created, right-click on Source Files in
Solution Explorer and select Add->Add New Item. Then select C++ Source File
from the dialog, name it and begin coding.

4. Any good web resources that can get me up to speed with VS2003 and the
C++ environment i.e. tutorials on debugging . solution explorer, tools,
resource view etc etc?

Many thanks!
tjones


--
Peter [MVP Visual Developer]
Jack of all trades, master of none.
Nov 17 '05 #2

P: n/a
tjones wrote:
Hi, I have installed VS2003 and have been wroting some c++ code.
Mainly created a win32 console application for my c++ program. I have
a few questions:

1. Is there a menu to compile/build/execute that I can put in the
menu bar instead of pressing F5? Right click on a menu bar. You've got a bunch o predefined menu bars for a
lot of things, and you can define/modify them using "customize" in the
context menu.
2. My DOS window vanishes after i press F5. I instead press Ctrl-F5
and the DOS window remains visible. But i dislike having to make this
physical stretch with my fingers when i need to rerun the
application. What else can i do to render the output visible? It
doesnt have to be a DOS output. Alas no. One option is to put a breakpoint at the end of main (since
pressing F5 makes the program run under the debugger). You can alsor un the
program from outside the developpement environnement (from an hand-launched
console for example).
3. I seem to have to always include: #include "stdafx.h" in all my
.cpp files. If i dont I get the following error:

ga.cpp(77): fatal error C1010: unexpected end of file while looking
for precompiled header directive

Is there any way of not having to include stdafx.h?


Disable use of precompiled header files in the project settings. You can
disable it per source file or project wide.

Arnaud
MVP - VC
Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.