What can be replaced with using namespace std; | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What can be replaced with using namespace std;

25th Aug 2020, 3:36 PM
Titi Yuri
Titi Yuri - avatar
2 Answers
+ 4
with "using namespace std;" #include <iostream> using namespace std; int main() { cout << "Hello" << endl; } _________________ without "using namespace std;" #include <iostream> int main() { std::cout << "Hello" << std::endl; }
25th Aug 2020, 3:40 PM
Rohit
+ 2
if you don't wanna use 'using namespace std;' then you need to std:: in each in every line in the cout and arrays without that std!
25th Aug 2020, 3:42 PM
Rellot's screwdriver
Rellot's screwdriver - avatar