C++ Basic problem
Void getdata(void) and void getdata() in c++???
Q:-2)In C,
void display()-empty parantheses implies any number of argument.this is also true in c++???
pls reply
Member • Nov 1, 2014
No, if you specify void, it simply means that it requires no argument and would be equivalent to second form. And yeah, the first function would be void getdata(void) not Void getdata(void)Mansi MunjalQ:-1)Is there any difference between
Void getdata(void) and void getdata() in c++???
I would first like to know how come this display() function can accept any no. of arguments in C?Mansi MunjalQ:-2)In C,
void display()-empty parantheses implies any number of argument.this is also true in c++???
pls reply
Member • Nov 1, 2014
i read somewhere that in C,if a function declared with an empty parentheses then in function definition we can pass any number of arguments.i want to know that is true in c++?Sanyam KhuranaNo, if you specify void, it simply means that it requires no argument and would be equivalent to second form. And yeah, the first function would be void getdata(void) not Void getdata(void)
Remember C/C++ is case sensitive.
I would first like to know how come this display() function can accept any no. of arguments in C?
Member • Nov 1, 2014
Your concepts are absolutely wrong!Mansi Munjali
i read somewhere that in C,if a function declared with an empty parentheses then in function definition we can pass any number of arguments.i want to know that is true in c++?
Member • Nov 1, 2014