GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 05-Nov-2007, 11:49
Murt88 Murt88 is offline
New Member
 
Join Date: Nov 2007
Posts: 1
Murt88 is on a distinguished road

Class Trouble


I'm new to this forum and need some help, Basically i have been given a small program but I'm not sure the best way to start part of the Class off. Basically it is for a jeans company.

They do four styles Slim-fit, Regular, Comfort and Extra-Long, in three sizes, 40, 36 and 32, and there is stock numbers for each of these. I'm pretty sure I'd know how to do the rest, it's just getting this Class started that's the problem
  #2  
Old 05-Nov-2007, 12:29
Algar Algar is offline
Junior Member
 
Join Date: Sep 2007
Posts: 94
Algar will become famous soon enough

Re: Class Trouble


the first word is "class" to say you're making a class.

After that you have to give it a name
  #3  
Old 05-Nov-2007, 13:54
fakepoo fakepoo is offline
Regular Member
 
Join Date: Oct 2007
Posts: 713
fakepoo is a jewel in the roughfakepoo is a jewel in the roughfakepoo is a jewel in the rough

Re: Class Trouble


This is a basic class definition and should get you started.
CPP / C++ / C Code:
enum JeanStye { jsSLIM_FIT, jsREGULAR, jsCOMFORT, jsEXTRA_LONG };

class Jeans
{ public:
    JeanStyle Style;
    int Size;
    // other public attributes

    Jeans();
    Jeans( JeanStyle style, int size );
    ~Jeans();

    // other public methods

    protected:
    // any protected methods/attributes
    private:
    // any private methods/attributes
};
 
 

Recent GIDBlogProgramming ebook direct download available by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Classes and allocating memory BlueFireCO. C++ Forum 13 26-Jul-2007 21:31
Hard drive/CPU Diagnoses Issues binarybug Computer Hardware Forum 1 22-Jan-2007 20:23
Box Class, need help again :( TransformedBG C++ Forum 7 13-Nov-2006 16:11
C++ class -- Please help vnca_1 C++ Forum 3 14-Jun-2006 13:31
a tester class and then some. postage Java Forum 1 06-May-2006 16:48

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 17:04.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.