Hey guys, I just have a simple (?) question. What difference is there, if any, between cin
and std::cin
(for example)? If the latter is better form, why is it so?
IIMarckus
0
Newbie Poster
Recommended Answers
Jump to PostHey guys, I just have a simple (?) question. What difference is there, if any, between
cin
andstd::cin
(for example)? If the latter is better form, why is it so?They are the same.
however you must bring the cin into scope by one of these ways:using …
Jump to PostUnless you are at a professional level there are very few times where you shouldn't include
using namespace std;
...unless of course you want to learn something.
Jump to PostI disagree.
I'm not alone. You may also want to read here.
You shouldn't program to avoid learning things. The purpose of namespaces …
Jump to Postusing namespace std;
is required for u 2 be able to use cin only
All 14 Replies
JRM
107
Practically a Master Poster
plgriffith
0
Junior Poster
Duoas
1,025
Postaholic
Featured Poster
c++ prog
0
Light Poster
JRM
107
Practically a Master Poster
Narue
5,707
Bad Cop
Team Colleague
carnage
24
Junior Poster in Training
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
carnage
24
Junior Poster in Training
invisal
381
Search and Destroy
Narue
5,707
Bad Cop
Team Colleague
invisal
381
Search and Destroy
Narue
5,707
Bad Cop
Team Colleague
IIMarckus
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.