Page 1 of 1
Learn C++ Weekend Crash Course
Posted: Thu Dec 12, 2002 1:50 pm
by Joey
my mom is taking out this book Learn C++ Weekend Crash Course, or something like that out from the library. she wants me to see if i like it or something. i told her i want learn c++ today, but she wanted me to look at it first to see if i like it. well its not in the library so shes taking out this book.
is it kinda good or something? i havent gotten it yet. i still want learn c++ today though.
Re:Learn C++ Weekend Crash Course
Posted: Thu Dec 12, 2002 2:06 pm
by jrfritz
I hear it's good. But I wouldn't know, since the only book I had to get was Learn C++ Today.
Re:Learn C++ Weekend Crash Course
Posted: Thu Dec 12, 2002 2:14 pm
by Joey
alright, i just got the book and it comes with a cd. now i borrowed it from the library, so i need to return it. on the cd, it says it has GNU C++. what is this?
Re:Learn C++ Weekend Crash Course
Posted: Thu Dec 12, 2002 2:22 pm
by jrfritz
GNU's C++ Compiler. Usually for Linux, but there are versions for DOS/Windows ( it's called DGJPP ).
Re:Learn C++ Weekend Crash Course
Posted: Thu Dec 12, 2002 4:10 pm
by Joey
yah its excated DGJPP. it came with the book. im gonna keep it on my pc. can i distribute programs made with that? maybe i should use that instead of vc++ 6.
Re:Learn C++ Weekend Crash Course
Posted: Thu Dec 12, 2002 4:13 pm
by jrfritz
It's hard to make Windows apps with DGJPP/GCC. GCC is good for DOS apps and making OSes
. But with GCC, you can copy and even HACK and MODIFY the compiler...and do whatever you want...BUT you must NOT charge for the software itself, but you CAN charge for distributing it in media form OTHER than internet.
Keep VC++ after learning GCC/Crash cource or Learn C++ Today.
Re:Learn C++ Weekend Crash Course
Posted: Thu Dec 12, 2002 9:23 pm
by Schol-R-LEA
I'm not familiar with either of the two books in question, so I can't comment on which is better, I'm afraid.
I can say that, in some ways, learning C++ with gcc from the command line is somewhat better than learning it first in VC++, though it takes considerably more effort initially. With C++, programming to the console (as opposed to a GUI like Windows) is the default; it would be better if you learn this more general style of C++ programming first, rather than dive into the Windows-specific material right away. The better you understand the core language from the start, the better off you'll be later.
If you can set up a programming editor like
RHIDE or
Emacs (one of them probably came on the CD) to work with the compiler so that you can compile your code without leaving the editor, it will be a bit easier, though EDIT or Notepad should do in a pinch
.
Fortunately, it should not make a big difference either way, as Visual C++ is also designed to create console programs (though not, strictly speaking, DOS programs), and most books on VC++ will teach you how to write those first. Which ever book you work with, you should use the environment that the text you are using expects you to use, to make it easier to follow along. Even with a well-standardized language like C++, differences in the working environment and subtle dialect variations can make working with two different compilers confusing.
Re:Learn C++ Weekend Crash Course
Posted: Thu Dec 12, 2002 11:01 pm
by Berserk
I have C++ Weekend Crash Course, it's a very good book.
Good Luck!
Re:Learn C++ Weekend Crash Course
Posted: Sat Dec 14, 2002 8:04 pm
by jrfritz
From Learn C++ TODAY! page 20 chapter 2:
F U N C T I O N S
We're going to start by writing a C++ function. Why will we start with a function? Because all C++ code is functions. If you look at C++ code, you are looking at functions. (Actually, definitions of object and other data structures are also things you write in C++, but whether these are correctly called code is a matter of definition.)
With one excption, you may give your C++ functions any name you like. The exception is that you must have one function named "main" so that C++ knows where to start. The simplest possible programs (such as the one we're about to write) have a function named "main" and no others.
These are the parts of a function definition:
<function type> <function name> <parameters>
<code>
We'll look at each one, in turn, beginning with the function type.