How to create a simple 'Hello World' in Visual Studio 2005?

Discussion in 'OT Technology' started by Swerve, Nov 12, 2007.

  1. Swerve

    Swerve OT Supporter

    Joined:
    Feb 20, 2005
    Messages:
    3,179
    Likes Received:
    3
    So where I am right now doesn't have Bloodshed Dev C++ installed and I'm having to use Visual Studio 2005 :hs:.

    In Bloodshed C++ you can just go File>New>Source File, enter your code and you can compile and run it. Simple.

    How can i do this is VS?

    Even when I enter this simple Hello World program:-

    It fails to compile at all, claiming there is an error.

    Meh, whats going on with this?

    Thanks
     
  2. StevesVR4

    StevesVR4 Get Arrested

    Joined:
    Jul 1, 2003
    Messages:
    7,328
    Likes Received:
    0
    So... What's the error?
     
  3. CodeX

    CodeX Guest

    File new project, win32 console application, enter name, click ok, click next...
    under "additional options" check the box by "empty project"
    click finish

    click solution explorer tab (should already be selected)
    right click on source files folder
    click on add new item
    select code on the left and C++ file on the right
    name it "main" or whatever
    click add
    type code
    build and run


    If that doesnt work give us the error

    I bet your problem is you are not working in a project you are just editing a cpp file and expecting it to build it. You need to be working in the scope of a project.
     
    Last edited by a moderator: Nov 12, 2007
  4. Swerve

    Swerve OT Supporter

    Joined:
    Feb 20, 2005
    Messages:
    3,179
    Likes Received:
    3
    You sir are a star!!

    Worked exactly as you said, really appreciate this!!

    :bowdown::bowdown::bowdown::bowdown::bowdown::bowdown::bowdown::bowdown::bowdown::)
     

Share This Page