0
Is using namespace std; mandatory?
4 Respuestas
+ 3
it's mandatory to use it in case you want to use the standard c++ built-in objects like "cout" or "cin" or "endl" directly
if you do not add it at your beginning of your cpp source file then you will have to prefix those objects with their corresponding class resolution scope operator, that is replacing "cout" by "std::cout", "cin" by "std::cin" or "endl" by "std::endl"
+ 1
Well, if you are using dev c++, you can always write "std::" (Something like this, I don't remember it now) before commands, the idea of writing "using namespace std;" is just for more comfortable work.
0
depends on ur compiler...dont need to if ur using turbo c
0
No...Could use header file #include<iostream.h> alone...