15 Mart 2010 Pazartesi

C++ Method Overloading

//www.ethemsulan.com
#include <cstdlib>
#include <iostream>
using namespace std;
void f(int a=0,int b=0){
cout<<"a: "<<a<<"  b: "<<b<<endl;
     }
int main(int argc, char *argv[])
{
    f();
    f(25);
    f(25,52);
    system("PAUSE");
    return EXIT_SUCCESS;
}

Hiç yorum yok:

Yorum Gönder