OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 25, 2024 1:51 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Learn C++ Weekend Crash Course
PostPosted: Thu Dec 12, 2002 1:50 pm 
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.


Top
  
 
 Post subject: Re:Learn C++ Weekend Crash Course
PostPosted: Thu Dec 12, 2002 2:06 pm 
I hear it's good. But I wouldn't know, since the only book I had to get was Learn C++ Today.


Top
  
 
 Post subject: Re:Learn C++ Weekend Crash Course
PostPosted: Thu Dec 12, 2002 2:14 pm 
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?


Top
  
 
 Post subject: Re:Learn C++ Weekend Crash Course
PostPosted: Thu Dec 12, 2002 2:22 pm 
GNU's C++ Compiler. Usually for Linux, but there are versions for DOS/Windows ( it's called DGJPP ).


Top
  
 
 Post subject: Re:Learn C++ Weekend Crash Course
PostPosted: Thu Dec 12, 2002 4:10 pm 
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.


Top
  
 
 Post subject: Re:Learn C++ Weekend Crash Course
PostPosted: Thu Dec 12, 2002 4:13 pm 
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.


Top
  
 
 Post subject: Re:Learn C++ Weekend Crash Course
PostPosted: Thu Dec 12, 2002 9:23 pm 
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.


Top
  
 
 Post subject: Re:Learn C++ Weekend Crash Course
PostPosted: Thu Dec 12, 2002 11:01 pm 
I have C++ Weekend Crash Course, it's a very good book.

Good Luck!


Top
  
 
 Post subject: Re:Learn C++ Weekend Crash Course
PostPosted: Sat Dec 14, 2002 8:04 pm 
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.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 136 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group