User Tools

Site Tools


cs509:cplusplusmain

See the following code:

// void function example
#include <iostream>
using namespace std;

void printmessage ()
{
  cout << "I'm a function!";
}

void printmessage2 ()
{
  cout << "I'm also a function!";
}

int main ()
{
  printmessage();
  printmessage2();
  return 0;
}

There are 3 functions defined above.

<poll Which of the three methods is executed first? (2)>

  • printmessage
  • printmessage2
  • main

</poll>

cs509/cplusplusmain.txt · Last modified: 2013/02/07 03:50 by jchung

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki