i recomend this for newbies

J

Jim Langston


It leaves a lot to be desired. For example, the "Model Programs - Example -
Celsius to Farenheit". http://www.fredosaurus.com/notes-cpp/basics/c2f.html

1. Telling a "newbie" to use
using namespace std;
is generally not a good idea. If you don't understand why, you probably
shouldnt' be giving suggestions to new programmers.

2. The "Model Program" has no error detection.

3. The "Model Program" uses a system call to an OS function to simply pause
the screen. No reason for this.
 
Z

Zeppe

Jim said:
It leaves a lot to be desired. For example, the "Model Programs - Example -
Celsius to Farenheit". http://www.fredosaurus.com/notes-cpp/basics/c2f.html

1. Telling a "newbie" to use
using namespace std;
is generally not a good idea. If you don't understand why, you probably
shouldnt' be giving suggestions to new programmers.

It's explained in the example you cited. And, moreover, in a lot of very
well-considered book, like Stroustrup, use that in every example.
2. The "Model Program" has no error detection.

It's for a newbie.
3. The "Model Program" uses a system call to an OS function to simply pause
the screen. No reason for this.

Agree.

Regards,

Zeppe
 
J

Jim Langston

Zeppe said:
It's explained in the example you cited. And, moreover, in a lot of very
well-considered book, like Stroustrup, use that in every example.


It's for a newbie.

Yes, that's my point. People should be taught error detection early so they
get used to it. When write code they'll start thinking, why use error
detection? None of the examples use it. Same with using namespace std;
Why even show them that at the beginning when it's purpose is to break the
purposes of namespaces in the first place?

Heck, why don't we show them goto also then? Something else they can say
"but all the code I've seen uses it" when we try to explain why it's
generally a bad idea.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top