Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

i like to use optional argument for

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
i like to use optional argument for a member function. how could i do that in vc++..
say
i have a fn named

void fun( char *File1 )

and i want to give second argument as optional.

void fun( char *File1, ..........) in this dotted lines what shall i give if at all i have to give optional arguments in vc++..

thanks in advance.
 
vc is c++,use predifined arguments.look at this:
void fun(char *file1="",char *file2="");
you can call:
fun ( "file1.cpp" );
or
fun ( "file1.cpp", "file2.cpp" );
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top