
Signature
Alvo von Cossel I of Germany
> i am just about as new to C++ as it gets and i have a friend who gave me a
> C++ example. the code is fine because he can compile it but i cant. i have
> vc++ express
>
> my first question is: do i click build or compile?
If you click build, then all of the source files in your project are
compiled and then they are "linked" with any external libraries to generate
an executable.
If you click compile only a single source file is translated to object code.
> my second question is: i am using iostream but vc++ gives me the error:
>
> "fatal error C1010: unexpected end of file while looking for precompiled
> header. Did you forget to add '#include "stdafx.h"' to your source?"
Some of my pals here might disagree, but at your stage I'd turn off the
option to pre-compile headers (h files).
From the menu, choose Project->xxx Properties->C++->Pre-compiled
headers->Not using pre-compiled headers
Regards,
Will
Alvo von Cossel I - 15 Jul 2005 07:13 GMT
hi,
thanks a lot. it works now

Signature
Alvo von Cossel I of Germany
> > i am just about as new to C++ as it gets and i have a friend who gave me a
> > C++ example. the code is fine because he can compile it but i cant. i have
[quoted text clipped - 21 lines]
> Regards,
> Will
William DePalo [MVP VC++] - 15 Jul 2005 14:42 GMT
> thanks a lot.
You are welcome.
> it works now
I'm glad.
The option that I helped you turn off speeds up compilation by compiling a
set of headers once and saving the results of that compilation. It can
greatly speed up the process. That's good. But you do have to learn how to
use it. Because you said that you were just starting out, I figured that's
bad. :-)
When you have time, you can read about the option here to trade some gain in
complexity for a gain in speed:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_co
re_creating_precompiled_header_files.asp
Regards,
Will