C++ Example Program

Here is an example program in C++ I made just for showing xD!

//This is an example C++ Program
#include <iostream>
using namespace std;

int main ()
{
  cout << “This is a C++ Program”;
  system(“pause >nul”);

  return 0;
}

This is the output:

C++ Output

Remember this is a simple program… This is very very basic.

Advertisements

5 Responses to “C++ Example Program”

  1. […] Nancy Reeves wrote an interesting post today onHere’s a quick excerptHere is an example program in C++ I made just for showing xD! //This is an example C++ Program #include using namespace std;. int main () { cout nul”); return 0; … […]

  2. Don’t use system(“pause>nul”), its batch input and isn’t useful for other OS’s.
    Try cin.get(); its better in c++ and it comes with iostream

  3. msbasic Says:

    Yeah I know, but cin.get is laggging PCs and some Mac and Linux versions are not catching it as pause

  4. Hey it’s me. SpythonS / Deleeted

    I’m making a trojan virus ATM.

    It makes you mouse go crazy, and starts typing things out of nowhere.

    After 3 days of researching and testing, All of the functions are in place.

    Not long until it’s officially run.

    ~SpythonS

  5. Why use int for main when the return value means nothing?

    #include
    using namespace std;

    void main ()
    {
    cout << “This is a C++ Program”;
    system(”pause”);
    }

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: