+ 1
what is the diffrence beteen void main(), return 0 and using nameplace
3 Réponses
+ 2
void main is your programs main function. the using namespace std is for importing the standard library; it basically inserts everything you would need if you called code from something in the standard library before it's used in your code so the compiler has reference of it. *edit* using Namespace is a way of telling the Compiler to look for the library you are going to call for example std or the Standard Template Library.
+ 1
now i got it thanx
+ 1
All Standard Library functions and variables are declared in a namespace "std" to avoid names ambiguity. E.g. cout is actually declared as std::cout and should be called like that if you'll omit "using namespace std".