AP Computer Science Workshop


C++ Functions

In C++ A function that takes no parameters has an empty parameter list:
      void PrintInstructions( )
      {
            cout << ...
      }
But be very careful with functions that take no parameters:
      PrintInstructions( );
is not the same as
      PrintInstructions;

Previous slide Mark Stehlik, Carnegie Mellon University Next slide