Sunday, September 11, 2016

Hello World Program

This hello world program is from page 7 in the textbook. It should work on any computer you try to use.

If you ask for an empty project in Visual Studio (Windows) or Xcode (Mac), you might get a program that has a little bit more than this, but the extra stuff is "mostly harmless." If you get a lot more stuff than this, you probably asked for the wrong kind of project.

#include <iostream>
using namespace std;

// main: generate some simple output

int main ()
{
  cout << "Hello, world." << endl;
  return 0;
}

No comments:

Post a Comment