Learn to Code via Tutorials on Repl.it!

← Back to all posts
Intro to C++ 🙂
h
anthonykung (23)

Hi, I've made a course on C++. It's the first time I made a lesson on Repl.it and I would love some feedback about this :)

https://repl.it/classroom/invite/afQhxBV

https://repl.it/classroom/invite/afQhxBV

Commentshotnewtop
katyadee (1250)

Wow! Thank you for sharing this Anthony.

anthonykung (23)

@katyadee I've just found out this is featured in the newsletter 52, thank you so much for the support 😃

manuel08 (3)

stop using std:: and use "using namespace std;" so you don't have to type std:: for every thing

samvader (2)

@manuel08 Isn't the whole point of namespaces to avoid name collision issues? It's best practice to just use std::.

manuel08 (3)

@samvader
I get your point but in my Experience of coding I haven't ran into that issue, and also what do you mean by avoiding name collision issues. The only name space I use is "namespace std" because "std::" is long to type and "namespace std"
only removes the need to type "std::" .
also can you please show my the collision issues I would like to see the issues and see what you are talking about

manuel08 (3)

@samvader also I don't want to be rude I just wanted to show what I meant stop using std:: sorry if I sounded rude

manuel08 (3)

@samvader also in c++ namespace std only removes the need to type std::;

samvader (2)

@manuel08 I mean, you're right that in projects that aren't large it's fine to use namespace std. In fact, I haven't really run across the issue either, but once you start working on huge projects it's best practice to keep the namespace in there. Obviously you can do whatever you want, but using namespace std basically removes the whole point of namespaces in the first place. here is a good resource that talks more about naming collisions if you're not really sure what I'm talking about. Again- you're right, it doesn't really matter that much.