1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

compiling in visaul c++

Discussion in 'C++' started by lipun4u, Mar 6, 2010.

  1. lipun4u

    lipun4u New Member

    Joined:
    Jan 25, 2010
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Software Engineer
    Location:
    Mumbai
    Home Page:
    I m newly using visual microsoft c++ 2008. I want to use stand C++ in this IDE. But when ever I try to compile any code, it gives me some crazy errors which say that I must include stdafx.h.

    Please suggest me how to get rid of this.
     
  2. techgeek.in

    techgeek.in New Member

    Joined:
    Dec 20, 2009
    Messages:
    572
    Likes Received:
    17
    Trophy Points:
    0
    Occupation:
    EOC (exploitation of computers)..i m a Terminator.
    Location:
    Not an alien!! for sure
    Home Page:
    I m pretty sure that u have tried to make a "win 32 console Application"... thr "stdafx.h" and "stdafx.cpp" are necessary files... In order to use visual c++ as a normal c++ IDE then navigate to:
    File---->New. There in the "files" tab select the "C++ source file". Now, I hope u wnt be getting any "stdafx.h" related errors..
     
  3. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    stdafx.h is only required if you have specified "Use precompiled headers". If you don't want to include stdafx.h, uncheck that option. Project - Settings - C/C++, you'll find it somewhere under there.
     

Share This Page