![]() |
CMPT 212
Spring 1998
|
// file display.h void display(char c); // first display function. void display(int i); // second display function. bool display(char c, int i); // third display function. // file one.cpp ... char letter; int width; bool result; ... display(letter); // calls first display function. result = display(letter, width); // calls third display function. display(width); // calls second display function.
void display(char c, int i); bool display(char c, int i); // causes a compiling error.
void display(float f); void display(bool b); ... int i; ... display(i); // calls display(float).
void display(float f); void display(bool b); ... char c; ... display(c); // causes a compiling error.
void display(long x); void display(int i); ... unsigned int i; ... display(i); // causes a compiling error.
void display(char c, int size = 12, int x = 0, int y = 0); ... display('W'); // same as display('W', 12, 0, 0). display('W', 5); display('W', 5, 16, 10); display(); // causes a compiling error.
![]() Return to lecture notes index |
|
This page is maintained by simpson@cs.sfu.ca. | Last updated on 19 Jan 1998. |