Thread: First Project

  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    329

    First Project

    Okay, after reading through PPP by Stroustrup, i've decided to do a small project based on the Top Trumps card game. Initially, it will just be a local console based game against the computer, then I will probably look to add more functionality such as basic graphics/network play etc.

    I've finished reading the sections on vectors/classes, etc and just before pointers, so thought I would test my knowledge thus far.

    I just wanted to check something with you guys first. My plan is to have 2 classes, a card class and a game class. The card class will basically be an outline of the cards stats. If I say want 30 cards in the game, would I simply create 30 objects of the class and store in a vector?

    I will then have a game class, responsible for the game logic.

    Thanks,

    Darren.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    This sounds reasonable.
    Be sure to know about references and possibly pointers before starting. They are essential tools for pretty much everything.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    Feb 2009
    Posts
    329
    Quote Originally Posted by Elysia View Post
    This sounds reasonable.
    Be sure to know about references and possibly pointers before starting. They are essential tools for pretty much everything.
    Okay, I will read up on pointers beforehand. By references, do you mean like pass-by-reference the & sign?

    Thanks.

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    That is called a reference, yes.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 09:05 AM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  3. Dynamic Binding
    By gpr1me in forum C++ Programming
    Replies: 1
    Last Post: 03-24-2006, 09:01 AM
  4. Game Independent Anti-cheat Project Needs Programmers
    By GIA Project Lea in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 09-15-2005, 07:41 PM