//Program tested on Microsoft Visual Studio 2008 - Zahid Ghadialy
//Simple example of unnamed arguments
#include<iostream>
using namespace std;
void someFunc(int a, int)
{
cout<<"Only a is defined to "<<a<<endl;
cout<<"The second argument is dummy"<<endl;
}
int main()
{
someFunc(15, 100); //100 is dummy
cout<<endl;
return 0;
}
The output is as follows:
No comments:
Post a Comment