0
Void print something(). Can we choose another function instead of void here. For example " main". Is void necessary ?
3 Respostas
+ 1
you are saying that can we replace void main() with main printsomething()
it this is the question then the answer is no. Because in the above case void is the function's type and main() is the function's name. However in the latter case main is the type while printsomthing is function's name now. Actually c++ search for the main() function in the program and executes what's inside it, so doing this will fail the compiler on searching the main() function.
0
your question is not clear!
0
can we replace void with main
main printsomething() like this