Can anyone suggest books that can help a first time C++ student. ;)

Accelerated C++ by Andrew Koenig and Barbara Moo. The Design and Evolution of C++ and The C++ Programming Language by Bjarne Stroustrup are also books you'll want to have on your shelf if you plan to really learn C++ and not just get through a few classes. :) Note that these are just starters. There are other books a serious C++ite will want to have and study regularly such as The C++ Standard Library by Nicolai Josuttis, C++ Templates by Nicolai Josuttis and David Vandevoorde, Generic Programming and the STL by Matthew Austern, Effective C++, More Effective C++, and Effective STL by Scott Meyers, anything by Herb Sutter, C++ IOstreams and Locales by Anjelika Langer and Klaus Kreft, the C++ standard itself, and about a dozen other texts that are interesting, but not must-have's.

:confused: Could you please let me know if I wrote the enumeration defintion & the struct of the deck of cards:

enum card suit (clubs, diamond, heart, spades)

struct card

{

Card suit suit;

int face value;

}

Class Deck

{

Public:

deck ( );

void shuffle ( );

int num have been dealt ( ) const;

card deal a card ( );

Private:

card the cards [52];

card dealt cards [52];

int num dealt;

{

deck: deck ( )

}

for (int i=0; i<13; i ++)

{

the cards . suit=club;

the cards . face value= i + 1;

}

[Repeat for all suits]

My deck:: deck ( )

{

card next card= the cards [num dealt];

dealt cards [num dealt]= next card;

num dealt ++

return next card;

}

int main ( )

Could you please let me know if I wrote the enumeration defintion & the struct of the deck of cards:

enum card suit (clubs, diamond, heart, spades)

struct card

{

Card suit suit;

int face value;

}

Class Deck

{

Public:

deck ( );

void shuffle ( );

int num have been dealt ( ) const;

card deal a card ( );

Private:

card the cards [52];

card dealt cards [52];

int num dealt;

{

deck: deck ( )

}

for (int i=0; i<13; i ++)

{

the cards . suit=club;

the cards . face value= i + 1;

}

[Repeat for all suits]

My deck:: deck ( )

{

card next card= the cards [num dealt];

dealt cards [num dealt]= next card;

num dealt ++

return next card;

}

int main ( )

This article has been dead for over six months. Start a new discussion instead.