C++ Beginner help with Visual Studio .NET

This is a discussion on C++ Beginner help with Visual Studio .NET within the C++ Programming forums, part of the General Programming Boards category; Hello everyone. I love this site BTW. It's helping me on my way to become a C++ programmer. Anyway, I ...

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    4

    Smile C++ Beginner help with Visual Studio .NET

    Hello everyone. I love this site BTW. It's helping me on my way to become a C++ programmer. Anyway, I need help compiling codes in VS .NET. I'm a novice so I'm not too familiar to that software. I've been using Bloodshed's compiler, which is xtremely easy to use. But when I go to compile in VS .NET, it creates a folder that has a bunch of files in it. How can I create a program in that environment? Please Help. Even though Bloodshed's C++'s compiler has been very helpful, I believe that my compiling future lies in VS .NET and the MSDN site isn't helpful to me at this stage.

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    Start the IDE. Click File->New->Project. On the left side select "Visual C++ Projects". On the right, select "Win32 Project". Give it a name and click ok.

    In the wizard that pops up, select "Application Settings" on the right. If you want a windows project, leave it as it is, if you want a console project ( DOS Window ) select Console. Click ok.

    In your solution explorer tree, you can now see your project consisting of at least three files. Select the cpp files that is named after your project and double click it to open it in view.

    Done.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    4
    Why does it create a .cpp file when I already have the source file? can I move it into the newly created folder?

  4. #4
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    If you already have your source, right click on the project in your tree, select "Add"->"Add existing item" and select your source.
    You can delete the file that was created by VS if you like.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  5. #5
    Registered User
    Join Date
    Mar 2002
    Posts
    4
    when I do that, I keep getting an error message:

    g:\Documents and Settings\Reisner\My Documents\Visual Studio Projects\whileloop.cpp(13): fatal error C1010: unexpected end of file while looking for precompiled header directive

  6. #6
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    Easy way:
    Include the stdafx.h file created for you.

    Hard way:
    Right click the project in the tree. Select properties. In the window, select C++ on the left side and Precompiled headers in the branch that appears. On the right, set the first line's combobox to the first entry: "Not using precompiled headers".
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  7. #7
    Registered User
    Join Date
    Mar 2002
    Posts
    4
    Thanks again, but now I get three errors:
    g:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29): warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated

    bmw error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup

    bmw fatal error LNK1120: 1 unresolved externals

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. more then 100errors in header
    By hallo007 in forum Windows Programming
    Replies: 20
    Last Post: 05-13-2007, 08:26 AM
  2. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 04:45 PM
  3. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  4. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 09:43 AM
  5. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 08:57 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21