5 ms·
References in my opinion should actually be called "Address of" operators, then it's much easier for someone new to see why pointers and references exist togeth
by Derpdiherp 12y ago
References in my opinion should actually be called "Address of" operators, then it's much easier for someone new to see why pointers and references exist together.
Printf and the cstdlib - eh yeah I'll hand you that, if someone had no concept at all that a language called C existed prior to C++ this would be confusing without explaining it to them. But a newbie should not be looking at C++ code that uses the cstdlib or printf anyway, they should be looking at streams and true C++ code to begin with.
- throwawayaway 12y agoC++ falls to the no true scotsman fallacy yet again. If you type in hello world to the internet, you are going to be getting C and C++ versions and you are going to find out that both work. You can't hide the truth from beginners for any length of time. Imagine telling someone that they can't look stuff up on the internet in case they get exposed to "the wrong stuff"? check out google on streams: http://google-styleguide.googlecode.com/svn/trunk/cppguide.html?showone=Streams#Streams http://google-styleguide.googlecode.com/svn/trunk/cppguide.h...
- Derpdiherp 12y agoBit of a strawman on googling for results - sure I'm not suggesting you can hide the fact it's a relative of C, but I know when I first started out every question I would ask the almighty google oracle would be appended with "C++" - "Why is my code crap C++" - so usually you'd get an actual C++ style solution. And so far as google and streams, well that's their opinion and fits into their particular style. There's plenty of dev houses that would tell you to avoid C style string manipulation due to the dangers of stack overflows etc. Anyway I'm not wanting to fall into a C vs C++ argument, I'm merely pointing out that it's very possible for someone to pick up C++ without having the slightest bit of knowledge of C to begin with. I sure didn't know any C to start with.
- throwawayaway 12y agoyou didn't understand C++ until you understood all the elements of C, you can start to learn C++ w/o C, but you can't continue. you even knew when you started that you had to append C++!