Total Begginer C++ Tutorial
the std libraries can include other std libraries. But that's not defined. So you shouldn't count on it. Always include the header you're going to use. That may work on your compiler (where their implementation includes 'string' in 'iostream'), but maybe not on your new learner which will be kinda confused.
Quote:Original post by NoWhereManQuote:Original post by Eriond
To use string, include string :) You didn't do that in your example.
Are you taking about #include <string>?
That's not necessary here, all you need to do is:
*** Source Snippet Removed ***
It works just fine, and this tutorial is intended for complete beginers.
- It is necessary.
- If you are going to write a tutorial for complete beginners, make sure it is completely correct so that they don't get completely weird errors with their completely incorrect code.
But hey! Atleast you're trying. Just make sure your information is correct before publishing it, and all will be well.
Quote:Original post by NoWhereMan
Are you taking about #include <string>?
Yes
Quote:That's not necessary here, all you need to do is:
Nothing in the C++ standard says that <iostream> has to define std::string.
Quote:It works just fine
Not on my machine.
Quote:and this tutorial is intended for complete beginers.
Which makes correctness even more important, misleading a beginner is the worst disservice you can give them.
Quote:Original post by WashuQuote:Original post by NoWhereManQuote:Original post by Eriond
To use string, include string :) You didn't do that in your example.
Are you taking about #include <string>?
That's not necessary here, all you need to do is:
*** Source Snippet Removed ***
It works just fine, and this tutorial is intended for complete beginers.
- It is necessary.
- If you are going to write a tutorial for complete beginners, make sure it is completely correct so that they don't get completely weird errors with their completely incorrect code.
But hey! Atleast you're trying. Just make sure your information is correct before publishing it, and all will be well.
The guy obviously hasn't got a clue what he's talking about, and shouldn't be writing tutorials.
blind leading the blind.
Quote:Original post by elementaryQuote:Original post by WashuQuote:Original post by NoWhereManQuote:Original post by Eriond
To use string, include string :) You didn't do that in your example.
Are you taking about #include <string>?
That's not necessary here, all you need to do is:
*** Source Snippet Removed ***
It works just fine, and this tutorial is intended for complete beginers.
- It is necessary.
- If you are going to write a tutorial for complete beginners, make sure it is completely correct so that they don't get completely weird errors with their completely incorrect code.
But hey! Atleast you're trying. Just make sure your information is correct before publishing it, and all will be well.
The guy obviously hasn't got a clue what he's talking about, and shouldn't be writting tutorials.
blind leading the blind.
While this may be true, you are none the less trolling a thread. Which is an even worse offense on these boards. Please try and keep it to a minimum.
Sorry, my bad, I have only been working with the Dev-C++ IDE, and have not used VS6.
I will try to be more precise before releasing a tutorial of any kind.
I will try to be more precise before releasing a tutorial of any kind.
Quote:Original post by GroZZleR
{ } are called braces, curly braces or curly brackets.
[ ] are called brackets.
( ) are called parenthesis.
Hey thanks, finally explained!
Nowhereman: Keep it going! I think its a pretty good intro.
Quote:Another common command that you must tell the computer is the "using namespace std;" command.
Needs more explanation.
Thermo
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement