·  MVS 2008 – C/C++ – Create – File – C++

 

- Info:

  - This tutorial shows how to create C++ file.

 

- Procedure:

  - Create C/C++ Project

  - RC on Source Files – Add – New Item... – Code – C++ File (.cpp) – Name: Test – Add – Paste Test.cpp

  - RC on Test.c – Properties – Configuration Properties – C/C++ – Advanced – Compile As: Compile as C++ Code (/TP)

 

    Test.cpp

    #include <cstdio>   //For printf()

    #include <iostream> //For std::cout

    

    using namespace std;

    

    int main () {

      printf("Hello World!\n");

      cout << "Hello World!" << endl;

      return 0;

    }