FANDOM


Here you'll learn a very basic program. All you'll need is:

After get what I said, start coding!

// my first program in C++

#include <iostream>

int main ()
{
  std::cout << "Hello World!" << std::endl;
}

We could also write the above code like this

#include <iostream>
using namespace std;

int main()
{
  cout << "Hello World!" << endl;
  return 0;
}

but the line 2 involves the concept of Namespaces, which is something a little complex for novice programmers! In C++, unlike C, the return keyword on the main() function is optional.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.