faqts : Computers : Programming : Languages : C++

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

13 of 38 people (34%) answered Yes
Recently 2 of 10 people (20%) answered Yes

Entry

C++.NET: How to create a new console application in Microsoft Visual Studio C++.NET?

Jan 4th, 2004 14:34
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 04 January 2004 - 09:01 pm --------------------

C++.NET: How to create a new console application in Microsoft Visual 
Studio C++.NET?

---

Steps: Overview:

 1. -Start Visual studio

 2. -click button 'New Project'
     or 'File'->'New'->'Project'

 3. -select from list 'Visual C++ Projects'
     in the left pane

 4. -you have to choose a new name for this project

     e.g.

      Name = Application1

      Location = c:\temp\visualcpp

                 (change this to your own choice)

 5. -select which Windows application:

    1. -double click on icon 'Win32'

       (this is for a usual .exe file,
        running on a Windows 32 platform)
        in the right pane


    2. -A wizard will start

    3. -Click on the left pane on link

        'Application Settings'

    4. -enable radio button

         'Console application'

    5. -enable checkbox 'Empty project'

    6. -click button 'Finish'

 6. -Add a CPP file to your project

     1. -select from menu option 'Project'

     2. -select from list 'Add New item'

     3. -click icon 'C++ File'

     4. -supply a name

          e.g.

           Application1

     5. -click button 'Open'


 7. You can now type your program code

    1. E.g.

        #include <iostream.h>

        void main( void );

        void main() {

         cout << "Hello World from C++\n";

         cin >> "";

        }

 8. Run your source code

    1. Press <F5>

 9. If a dialog box wanrs about project configuration
    out of date, rebuild them

    1. -click button 'Yes'

10. You should see then an MSDOS screen with your
    application

11. To avoid this screen disappearing, use
    e.g.

        cin >> "";

    in your code, then click on 'x' in the right top
    to close that MSDOS screen.

---
---

Internet: see also:

---

C++.NET: How to create a new Windows application in Microsoft Visual 
Studio C++.NET?
http://www.faqts.com/knowledge_base/view.phtml/aid/28042/fid/163

---

Microsoft: .NET: Visual Studio: Visual Basic: How to create a Visual 
Basic .net console application?
http://www.faqts.com/knowledge_base/view.phtml/aid/27271/fid/176

---

Visual Studio .NET 2003 C++ Tutorial
http://web.sau.edu/LillisKevinM/C++Tutorial/dotNet/

----------------------------------------------------------------------