As a newbie to C++...

This is a discussion on As a newbie to C++... within the C++ Programming forums, part of the General Programming Boards category; Hi. I've been wanting to learn C++ for some time, mostly for game development, and after seeing it at a ...

  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    2

    As a newbie to C++...

    Hi. I've been wanting to learn C++ for some time, mostly for game development, and after seeing it at a bookstore, I picked up a copy of Teach Yourself C++ in 21 Days. However, it's only covering the DOS aspects, and I'd like to work in Windows. Should I trade it in for the Visual C++ Edition, or should I learn C++ first, then Visual C++? Or should I get another book entirely? Sorry for all the questions, but I don't want to spend time learning something, only to have to "un-learn" it to develop in Windows. Thanks.

  2. #2
    #include<xErath.h> xErath's Avatar
    Join Date
    Jun 2004
    Posts
    722
    First learn basic C++, and to use the standard libraries. I think that book will do.

    Later you can start to work with operating systems APIs, which itself requires a good deal of programming knowledge, so back to point one.

    I learned C++ in 4 days.. but I already knew then C and java

  3. #3
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    Bin the crap and get this beauty instead.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  4. #4
    essence of digital xddxogm3's Avatar
    Join Date
    Sep 2003
    Posts
    589
    i'm partial to the deitel series
    http://www.deitel.com/books/cpphtp5/

    as for the windows aspect.
    look around the windows programming forum.
    you will notice from the posts there, that windows is a higher level of c++ knowledge. c++ basics need to be learned first before you build on it to work with windows.
    "Hence to fight and conquer in all your battles is not supreme excellence;
    supreme excellence consists in breaking the enemy's resistance without fighting."
    Art of War Sun Tzu

  5. #5
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    You're a long way from doing graphics with C++. Learning the "basics" of C++ takes a lot of work, as you might have gathered from the thickness of that book you have. How much time and effort are you willing to spend?

    There is a book that teaches beginning C++ in the context of game programming, but it still only convers input and output in a console window(DOS):

    http://www.amazon.com/exec/obidos/tg...books&n=507846

    Should I trade it in for the Visual C++ Edition, or should I learn C++ first, then Visual C++?
    C++ comes before Visual C++ in the grand order of things. There is a book called "Ivor Horton's Beginning Visual C++" that is the same size as your book. The first half is on beginning C++, and the second half is on beginning windows programming, so you might be able to jump into windows programming a little quicker with that book. I can recommend any book by Ivor Horton.
    Last edited by 7stud; 05-16-2005 at 11:00 PM.

  6. #6
    Registered User
    Join Date
    May 2005
    Posts
    2
    Thanks for all the help. I might look into getting that Beginning Visual C++ book.

  7. #7
    Registered User
    Join Date
    May 2005
    Posts
    9

    Poker Program Help

    I'm currently working on a poker program, it's an exercise in my Fourth Edition Deitel C++ How to Program book. Everything works properly, but my cards seem to repeat. I don't have any code stopping them from repeating, but I I've been toying around with the idea:

    Code:
    If (Card == selected)   {
        card[used] = true;
    }
    I definately think a boolean value would work in this case, I just can't get the syntax right. It doesn't seem to like the code:

    Code:
    void shuffle( int wDeck[] [ 13 ]/*, bool wUsed[]*/ )
    {
    	int row = 0;
    	int column = 0;
    	bool Used[52] = false;
    It has an error with the last line saying:

    'initializing' : cannot convert from 'const bool' to 'bool [52]'

    Can anyone help me out?
    Thanks, Denied

  8. #8
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    You can't assign a single value to a whole array. And please start new threads for new problems.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  9. #9
    Registered User
    Join Date
    May 2005
    Posts
    9
    OK, but how can I initialize a boolean Array?

  10. #10
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,801
    Quote Originally Posted by Denied88
    OK, but how can I initialize a boolean Array?
    Use a loop.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  11. #11
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Or an array initializer

    Code:
    bool ar[100] = {false, true, false, false };
    All entries not given explicitely are set to false.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. newbie: array question :(
    By cstudent in forum C Programming
    Replies: 2
    Last Post: 04-09-2008, 06:46 AM
  2. getting to grips with allegro and ms vc++ (newbie)
    By jimjamjahaa in forum C++ Programming
    Replies: 4
    Last Post: 11-18-2005, 06:49 PM
  3. Newbie in problem with looping
    By nrain in forum C Programming
    Replies: 6
    Last Post: 11-05-2005, 11:53 AM
  4. Some help for a newbie?
    By Ilmater in forum C++ Programming
    Replies: 23
    Last Post: 04-19-2004, 07:44 PM
  5. Newbie Game Develpoers Unite!
    By Telenosis in forum Game Programming
    Replies: 10
    Last Post: 06-22-2002, 02:02 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21