Thread: Why don't the tutorials on this site work on my computer?

  1. #1
    Registered User
    Join Date
    May 2006

    Why don't the tutorials on this site work on my computer?

    I'm fairly confident that the problem is with my compiler, not the tutorials. These tutorials line up with other things I've seen before, which means they're obviously accurate.

    Why don't the tutorials on this site work on my computer? In the tutorials section of the site, under "Intro to C++", there is a program that the author wrote that tells cout to say, "Hey you i'm alive oh and hello world," and causes main() to return the value of 1. It was recommended by the author to try this out on my computer, so I did, using Microsoft Visual C++ .net 2003. It did not work. Even doing similar variants to it, it would not work. I also wrote the program with the int variable thisisanumber, and that would not work.

    My compiler keeps on coming back with this message:

    unexpected end of file while looking for precompiled header directive.

    Believe me, I am doing everything the author says. I've even tried my own programs according to what he/she wrote was acceptable, and my compiler came back with the same message, not compiling what I wrote. Why?

    I think it has something to do with the selection for precompiled headers I'm using, but even writing stereotypical C programs using other headers doesn't seem to work right.
    Last edited by jsrig88; 05-15-2006 at 10:36 PM.

  2. #2
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Chch, NZ
    this is a problem with your compiler, not the tutorial.

    before you freak out, visual 2003 is a perfectly good compiler (in fact it's one of the best), but by default it uses precompiled header files, which you don't need at the moment.

    right click on your project file and go to properties->C/C++->precompiled headers and select "Not using precompiled headers"
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

  3. #3
    Registered User
    Join Date
    Jan 2005
    In the future, when you create a project, create a Win32 Console Application, and when the new project wizard appears click on the second tab and check the Empty Project checkbox.

  4. #4
    Registered User
    Join Date
    May 2006
    thanks, I thought it was my compiler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A talking computer
    By AdamLAN in forum C++ Programming
    Replies: 19
    Last Post: 09-24-2004, 06:17 AM
  2. Regarding Undergraduate Computer Majors
    By UnregdRegd in forum A Brief History of
    Replies: 11
    Last Post: 10-04-2003, 11:55 AM
  3. Computer engineering - programming.
    By Unregistered in forum C Programming
    Replies: 10
    Last Post: 07-15-2002, 02:37 PM
  4. Replies: 0
    Last Post: 03-06-2002, 04:02 PM
  5. A new idea...and it just might work...
    By DavidP in forum A Brief History of
    Replies: 0
    Last Post: 10-04-2001, 10:54 PM