Just Wondering

Posts 1–14 of 14 · Page 1 of 1
Just Wondering
I was trying to compile an alternative of "Hello World" and I was wondering,

As I was compiling it, it said there was an error.

The error was that I didn't include "#include stdafx.h" in the beginning of the code.

In the tutorial, it didn't say that was needed. Is that a MVSc++ 2008 feature?

Or do I not need to include it.

IMHO, that's really annoying =_=
Try it on another compiler such as DevC++
Whats the source code?
Im not at home right now. My grandfather came home from the hospital and my family is going to visit him
Visual studio uses a pre compiled header, "stdafx" by default. It won't compile anything before this header file. If you didn't include it VS is going to spit out and error telling you that it wasn't found.

You can remove the need for this.

In your project properties, go in the C/C++ tab. On the right, the first setting will be "Create/Use precompiled headers", by default, it will be set to "Use Precompiled Header (/Yu)". Change it to "Not Using Precompiled Headers".

Or you could just simply include it. It could come out useful in the long run when dealing with many user defined headers.
All right...

I usually delete everything inside the cop file so instart from scratch.

Instead if deleting everything, I'll just delete everything but the #include stdafx.h part
Quote Originally Posted by KABLE View Post
All right...

I usually delete everything inside the cop file so instart from scratch.

Instead if deleting everything, I'll just delete everything but the #include stdafx.h part
Reason #1 why Dev-C++ is easier :l ...
Quote Originally Posted by why06 View Post
Reason #1 why Dev-C++ is easier :l ...
lol. I don't use Bloodshed because my av goes balistic when I compile something
Quote Originally Posted by KABLE View Post
lol. I don't use Bloodshed because my av goes balistic when I compile something
Reason #1 to disable AV. =/
Quote Originally Posted by why06 View Post
Reason #1 to disable AV. =/
But I dun wanna :'(
Quote Originally Posted by KABLE View Post
But I dun wanna :'(
Thats the #1 reason why your Dev will never work.
Quote Originally Posted by KABLE View Post
lol. I don't use Bloodshed because my av goes balistic when I compile something
I've never heard of an anti-virus that sees compilation as a threat.
Quote Originally Posted by Void View Post
I've never heard of an anti-virus that sees compilation as a threat.
/agreed.
My antivirus just asks me if i want to allow the program to run. What AV are you using?
lol I have never used the precompile headers
always created blank win32 projects

anyway just get a better AV or just turn it off while compiling
I have Avast.

I was doing Hello World on it and when I was compiling it, Avast said it picked up a Trojan.

D:
Posts 1–14 of 14 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us