GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: No Line Numbers


A Paste by Anonymous
1
 
#include <iostream>
using namespace std;

// Functions vary only by parameter type
void doSomething( int x );
void doSomething( double x );

int main() {
    int y = 6;
    double b = 9.0;

    doSomething( y );
    doSomething( b );

    return 0;
}

void doSomething( int x ) {
    cout << "doSomething( int x ) called." << endl;
}

void doSomething( double x ) {
    cout << "doSomething( double x ) called." << endl;
}