I need ADVISE: resuming learning of Visual C++

Started by
4 comments, last by toastysquirrel 20 years, 10 months ago
Hi everyone. First time here. I picked up "AI techniques for Game Programming" and after going through a bit I realized that I need to refresh my knowledge of C++. The last time I did any coding was from a book "Visual C++ in 12 Easy Lessons" back in 1997-98. Here's my problem. I want to learn C++, however the two compilers I've been trying to use is "Microsoft Visual C++ 6.0" and "Dev C++ (beta 5)". Both are great compilers however one problem I'm running into is that it seems that then dumb down the coding a bit. Here's what I'm trying to do: I want to learn C++ coding (so I can get onto the AI), but I really want to learn it, not have some compiler automate everything for me (while I'm learning). I found a way to play with Dev C++ so that it seems to completely rely upon my input; however some of the code seems a bit different from what I've learned in the past. example: // this is how I learned to code simple output 5 years ago // using MSVC++ 1.0 #include <iostream.h> void main() { cout << "What should I do?" << endl; return; } --------------------------- // this is how I deduced to code the same output using // Dev C++ (beta 5) #include <iostream.h> int main() { cout << "What should I do?" << endl; return 0; } --------------------------- What I'm asking is this: Since I want to learn how to code Visual C++, including the basics, is there a compiler I can use that that is completely reliant upon users input (and is still really functional) so that I'm not cheating myself out of learning the language. What I don't want to happen is (for example) me to learn on a compiler, then if I switch to a more basic compiler one day (for whatever reason) I'm left with a blank look on my face because there was some basic fundimental code that I didn't learn because the first compiler did it all for me? Is this a realistic question? Any advise would be absolutely great! Thanks, Toasty (ED: yes I know I posted this before. I reposted it because I realized that topic title sounded like *I* was the one *giving* advise, instead of requesting it ) [edited by - toastysquirrel on June 14, 2003 8:16:05 PM]
Advertisement
Hi Toasty,

Damn! You started on C/C++ near when I started! :D

I''m not exactly sure what you mean by the compiler "doing things for you". If you''re concerned about the wizards in the Microsoft compilers, you can simply ignore them and go it alone. The only wizard that I have used so far to code was that which allowed me to build Win32 menus quickly. Everything else I''ve done bare-bones.

Good luck mate!

Beginners and experts will find answers here.
#include <iostream.h>void main(){cout << "What should I do?" << endl;return;} 


Well, the main difference is the code above is not C++, where the other example is (though using deprecated headers). Also the return is implied (despite MSVC''s complaints) so feel free to omit it.

#include <iostream>int main(){  std::cout << "This is what you should do." << std::endl;} 


The above is "more correct".


[My site|SGI STL|Bjarne FAQ|C++ FAQ Lite|MSDN|Jargon]
Ripped off from various people
[size=2]
If you _really_ want to learn standard C++, pay $20 and download the offical ISO standard.

Then, get gcc/make (mingw/msys if you''re on windows) and learn makefiles.

That''s the minimalistic way to do it.
daerid@gmail.com
quote:Original post by toastysquirrel
Here's my problem... "Microsoft Visual C++ 6.0" and "Dev C++ (beta 5)"... dumb down the coding a bit.

...there was some basic fundimental code that I didn't learn because the... compiler did it all for me...


I'm not really sure what you're refering to. What are you suggesting that the compiler did for you?

Are you talking about the return 0?

This is to do with MSVC (and other compilers) allowing you to write non-standard code and compile it without raising an eyebrow. Partly this will be because the standard wasn't finalised before they brought their products out and partly because they've added their own extensions and partly because it's plain wrong.

Learning C++ well means two thing at least: learning standard c++ and learning the differences and limitations of certain compiler implementations and how to work around them. It's just one of those things.

As you've learned c++ before I'd recommend these books:

Accelerated C++ - to get you up to speed using possibly new and standardised language features and the standard library.
The C++ programming language 3rd edition Bjarne Stroustrup - the horses mouth and a good read.
Exceptional C++ and More Exceptional C++ - Herb Sutter of guru of the week fame. Read all of those gotw links if you don't buy the books.
Effective C++ on CD by Scott Meyers. Cheap, readable and browsable style guide. (I looked up the cheapest price in the US I could find for you)

[edited by - petewood on June 16, 2003 4:30:15 AM]
Wow, thanks alot everyone!

What I meant by this "...but I really want to learn it, not have some compiler automate everything for me..."; I was refering to the wizards in VC++6.0, which can be excessivly annoying when you don''t want them to be coming up. With some pointers I think I''ve figured out how to use MSVC++ 6.0 at it''s basics w/o having the compiler insert more code then I''m interested in.

Now the trick is to get a good book to refresh myself on since my knowledge of C++ is apparently outdated. I thought a programming language stayed the same through time (unlike most other things with computers), learn something new all the time eh

Anyway, I think I''ll grab a book, between the reviews on this site, the recommendations from you guys and then cross reference to reviews on Amazon. If anyone has any further recommendations on a good book for an advanced beginer, my ears/eyes are always open.

Thanks again!

Toasty

This topic is closed to new replies.

Advertisement