Courses
Courses
Code Compiler
Code Compiler
Discuss
Teams
Log in
Register
Menu
Q&A Discussions
Search
Search
Ask a question
Ask a question
[solved] Why they're saying that using namespace std; is a bad practice?
c++
cpp
namespace
newbie
noobquestion
1 Vote
1 Answer
19th Jan 2021, 11:38 AM
jayveey
Why is the namespace doesn't work in c++ in pc?
c++
1 Vote
1 Answer
14th Aug 2017, 1:24 AM
Saurabh Raxstar
#include <iostream> using namespace std; int main() { cout << "Hello world!"; return 0; }
java
-3 Votes
5 Answers
25th Nov 2016, 3:54 AM
Ahmet Bozkurt
What does the following mean...#include <iostream>....using namespace std; .... <<cout"hello world" ....return 0;
c++
3 Votes
3 Answers
7th Mar 2017, 1:09 PM
Siyabonga Mkhatshwa
What is the difference between #include<iostream.h> & #include<iostream> using namespace syd; ?
c++
include
1 Vote
3 Answers
19th Feb 2017, 1:24 PM
Samarth Sharma
#include <iostream> using namespace >std; int main() { cout << "C/n+/n+">>endl; return 0; }
code
problem
0 Votes
4 Answers
2nd Feb 2022, 7:49 AM
ᴮᴰ⁷¹〆ᴀʟᴀмιɴ﷼ツ࿐
Why do we use "using namespace std " in a c++ program
c++
namespaces
0 Votes
2 Answers
20th Nov 2017, 4:17 PM
Athish
Can we use iostream.h
c++
namespace
0 Votes
3 Answers
27th Nov 2020, 8:23 AM
Shivani Kodape
#include <iostream> #include<string> using namespace std; int main() { string a; cin>>a; cout<<a; return 0; }
c++
strings
4 Votes
8 Answers
9th Mar 2017, 4:09 PM
SIGMA
Is 'using namespace std' compiler dependent? bcoz I never used it in turboC++?
c++
compiler
namespaces
1 Vote
4 Answers
16th Jan 2017, 1:16 PM
sandhya
#include <iostream> using namespace std; int main() { for (int x=1; x<10; x++) { if (x==2){ continue; } if (x==5){ break; } cou
c++
programming
1 Vote
12 Answers
30th Dec 2022, 3:45 PM
Alex Boso Nzaphila
Why are we use the "using namespace std;" in the programm
c++
cout
0 Votes
2 Answers
12th Sep 2017, 5:06 PM
Nikita Sonava
Why in PC when we write using namespace std; we get an error
c++
2 Votes
3 Answers
7th Dec 2016, 12:31 PM
Ravi Kumar
Why u are using namespace and only iostream instead of iostream.h?
c++
comments
0 Votes
2 Answers
28th Aug 2016, 5:01 PM
Rhytham Natesan
Что значит () в c+++?
c++
namespace
0 Votes
3 Answers
1st Dec 2020, 6:50 PM
Dark sashakraft
What is the purpose of using' using namespace std ' in c++
namespaces
std
using
0 Votes
2 Answers
7th Jan 2019, 9:37 AM
Ravi Henry
#include<iostream> #include<string.h> using namespace std; class Utensil { private: int price; int siz
c++
0 Votes
2 Answers
19th Aug 2020, 3:29 PM
Mtauqeer Ali
int main()
int
intmain
main()
namespace
2 Votes
20 Answers
4th Jul 2021, 8:25 PM
faran allah verdi
#include <iostream> using namespace std; int main() { int a[]={3,5,2,1}; for(int i=1;i<5;i++) { a[0]=a[i]+1; } cout<<a[0];
c++
0 Votes
10 Answers
23rd Dec 2016, 1:46 PM
Sumit Lokhande
Does anyone know a namespace in c++ which contains the "×" sign?
c++
error
namespaces
0 Votes
1 Answer
2nd Sep 2019, 2:36 PM
️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️️
#include <iostream> using namespace std; int main() { int a,b,c; cin>>a>>b; c=a+b; c=a-b; cout<<c; return 0; }
c++
1 Vote
7 Answers
30th May 2018, 8:21 AM
Bunny
Помогите с задачей . Не могу понять что после if задавать
c++
namespace
0 Votes
2 Answers
25th Dec 2020, 10:40 AM
София Верещагина
#include<iostream> #include<math.h> using namespace std; int main() { double x=0.5,result; result =cos(x); cout<<"cos("<<x<<")="
123
0 Votes
2 Answers
8th Jan 2020, 2:29 PM
Ķaņï Ķańï
Why using namespace std; is used in dev c++not in turbo c++??
c++
1 Vote
2 Answers
12th Nov 2016, 7:15 PM
Waqar Ali
What is namespace ? Is it compulsory to use it ?
c++
0 Votes
1 Answer
14th Dec 2016, 6:17 PM
Darshan Dhoriya
Should I include'using namespace std' before main fiction in all program
c++
0 Votes
1 Answer
26th Jun 2019, 5:40 PM
Vigneshwar A
#include <iostream> using namespace std; int main() { int x = 15/(3*(5/3)); cout << x; return 0;} D output wz 5 hw
operators
3 Votes
9 Answers
29th Mar 2018, 6:32 AM
JeClives
do i have to add #include<iostream> using namespace std after every {} block
c++
variables
1 Vote
3 Answers
14th Jan 2017, 5:24 AM
jonathin
#include <iostream> using namespace >std; int main() { cout << "C/n+/n+">>endl; return 0; }
problem
-1 Vote
3 Answers
2nd Feb 2022, 7:04 AM
ᴮᴰ⁷¹〆ᴀʟᴀмιɴ﷼ツ࿐
#include <iostream> #include <iomanip> using namespace std; int main(); { int n[10]; for(int i=0;i<10;i++) cout<<"element"<<s
no
-1 Vote
4 Answers
18th Aug 2020, 3:40 AM
Mairaj jamali
Do we have to use using namespace std if we have written end1 in the code?
c++
2 Votes
5 Answers
31st Aug 2018, 2:50 PM
Samiksha Santosh Dhumal
#include <iostream> using namespace std; int main() { cout << "Hello world!"; return 11; } is something wrong
program
0 Votes
8 Answers
18th May 2018, 3:08 PM
Shivam Kumar
It's always to use "using namespace std"in c++.....and I want to know cin is used for which purpose.
c++
in
namespace
using
0 Votes
8 Answers
7th Jul 2020, 3:57 AM
Navneet Kaur💫
#include <iostream> #include <string> using namespace std; class myClass { public: void setName(string x) {
encapsulation
0 Votes
3 Answers
21st May 2020, 6:22 PM
Salini Selvam
#include <iostream> using namespace std; int main(){ int age; cout<<"Please enter age"; cin>>age; int group; while(ag
c++
2 Votes
3 Answers
17th Sep 2020, 5:32 AM
Nurul Izzati
#include <iostream> using namespace std; int main() { //print "C++ is cool" return 0; }
answer
it
please
1 Vote
2 Answers
7th Oct 2021, 7:05 AM
Trupti Giri
Hi guys i chose computer engineering as my course, is it okay if i study and master c++?
c++
namespace
-2 Votes
2 Answers
19th Sep 2021, 12:45 PM
Sugoi Fanny
Now after much research about the purpose of using namespace std in c++
c++
collision
name
name
space
using
0 Votes
1 Answer
1st Aug 2020, 11:16 AM
XYZ
#include <iostream> using namespace std; void printSomething(int x) { cout << x; } int main() { printSomething(42); }
<b>
1 Vote
4 Answers
14th Apr 2018, 12:20 PM
TOKOLLO COLLEN
#Include <Iostream> using namespace std; { Int num=1 While(num<6) { Cout<< "Number"<< num<<endl; Num=num+3; } }
c++
1 Vote
6 Answers
12th Apr 2017, 7:12 PM
Abdi
#include <iostream> using namespace std; int main() { cout<<12+"good morning\n"-24; return 0; }
c++
1 Vote
1 Answer
4th May 2017, 6:20 PM
siddiqui junaid
#include <iostream> using namespace std; int main() { int a[]={1,2,3,4}; for(int x=0;x<4;x++) { a[0]+=a[x]; }
c++
1 Vote
2 Answers
3rd May 2019, 3:06 AM
Husaain Naqvi
Why "using namespace std ;" is used in c++ please help me iam beginner to c++.
c
c++
0 Votes
3 Answers
17th Oct 2020, 7:17 AM
BALAKUMAR N
What does the using namespace std mean? I dont really understand. Thanks!
c++
0 Votes
1 Answer
24th Sep 2016, 10:01 PM
Kevin
#include <iostream> using namespace std; int main() { int a=1 ,b; a=b; cout << b+a; return 0; }
variables
1 Vote
8 Answers
25th Jan 2019, 6:42 AM
Akash Kumar
#include <iostream> using namespace std; int main() { int x=2; cout <<(x-++--x); return 1; }
c++
data-types
0 Votes
4 Answers
25th Sep 2016, 12:40 PM
Sourabh Goyal
Code writting format
c++
namespace
0 Votes
1 Answer
20th Jul 2018, 3:16 PM
צחקاسحاق
#include <iostream> using namespace std; //Compiler version g++ 6.3.0 int main() { int myVariable = 10; "Cout" << "myvari
print
0 Votes
7 Answers
26th Aug 2020, 11:11 AM
JASHANPREET SINGH
C++ why std:: at every line instead of adding just once user namespace std;
namespace
std::
user
1 Vote
1 Answer
20th Sep 2018, 6:22 PM
Sabine Meijran-Prins
is this code wrong # include <iostream> using namespace std; int main() { int age; cin>> age; switch(
c++
0 Votes
6 Answers
17th Feb 2020, 9:52 PM
MÆŘEÁLT
Ask a question
Ask a question
Ask a question
Ask a question
< Previous
1
...
4
5
6
...
9
Next >
Hot today
Javascript
3 Votes
I Had Solve My Own Way But I See Others Method which I had added as Comented code I don't Understand Working Can You explain me?
2 Votes
What i do?in html intermediate level i dont like.
2 Votes
How to get mentor in solo learn.any mentor who response my activity🥹
1 Votes
Why text takes time to load
1 Votes
What is late happening in late binding
1 Votes
Digital currency
1 Votes
Did You resolve Calculating The Discount?
0 Votes
I had an issue, I have PRO version, but not unlimited lives.
1 Votes
Why my code closes when i choose a border and submit?
0 Votes