RE: [Dev-C++] newbie questions without answer
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ho...> - 2002-08-13 12:54:36
|
=20 -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Carlos Garc=EDa del Monte Sent: Tuesday, August 13, 2002 12:50 PM To: dev-cpp-users-list Subject: Re: [Dev-C++] newbie questions without answer I must mention that C++ provides already a string type defined in <string>. So why do you bother? :)=20 Just an example of the book with which Mr Senen is working for learn (C/)C++. Which has a part that although being C++ shows C things, this is used for introduce the reader to objects, overloading and such things. It is almost the "How to Program C/C++" (same authors) with tiny modifications because the title says it is more oriented to C++. But the truth is that there is only one book, but they make three parts: about 20 pages of only C for the "how to C/C++", 20 for "C++ how to" and about 1200 for both. =20 I am sorry about this, but to tell you the truth i do not like the approach. C and C++ are different languages. Thinking of C++ as C with extensions is not right. C++ has many of its roots in C, but to be precise as Stroustrup says "C++ is as close to C as possible, but not closer". =20 =20 =20 A way to sell two books when they have only one, in essence. This book is which I found better for learn programming (but I couldn't find many), and well, it seems I'm learning, but with no few errors (I mean I have more than few errors), I got the spanish translation (as said in a previous message) translated by someone which should go to first course to learn speaking, and perhaps due to his translation or the original, I found it has some ambiguities, and misleading things. They don't pay enough attention to a couple of pointer things, and the treatment of bitwise operation is misleading: they say something like "usually these operations are performed over ints and chars", but it is not exact, because it makes think that it usually is used with such vars, but could be used with doubles, longs... and not, they only work with ints and chars, they must be used with ints and chars. =20 =20 =20 The bitwise operators are performed on integer types, that is from signed char-long, and their unsigned equivallents. And this when we are talking about the operators for the built-in types. And because the implementation of the signed types is implementation dependent (they may have a sign bit, but they may have not) we (or perhaps i, i do not know for sure) usually use the unsigned ones. Of course you can use them on signed ones where the possible existence and non-existence of a sign bit doesn't affect your application. =20 =20 Just like saying "people usually flies with planes or helicopters", usually?, try to fly yourself with a red cape, and then tell me if the word is only usually. And in the "how to C/C++" the teaching of memory allocation is awful (the C functions there, malloc, calloc, realloc and free), it sem harder than quantum physics but is easier than 2+2 (or perhaps my english is the cause).=20 =20 Do not use malloc() family inn C++, they do not call the constructors. After finishing the book you are currently reading, i suggest you buy "Accelerated C++" by Andrew Koenig, Barbara Moo so as to escape from the confusion. This book is approved by god, that's why it has his name at the bottom (Bjarne Stroustrup). =20 And before buy a book, i suggest take a look at http://www.accu.org book reviews. They are professional coders and make neutral and reliable reviews. If i remember well, god recommended this site to me too. =20 =20 =20 Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net <http://www.noicys.cjb.net/>=20 * Alternative URL: http://run.to/noicys |