Header File

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2005
Posts: 3
Reputation: amarigny is an unknown quantity at this point 
Solved Threads: 0
amarigny amarigny is offline Offline
Newbie Poster

Header File

 
0
  #1
May 1st, 2005
Hello,

I am studying C++ at Uni and my coding is not very strong. More to the point I am having issues with my header taking in this string.

The code works in a linear non object oriented code but as I am new to data abstraction I as mentioned earlier having problems with the header file. The header looks like this:

class clientType{

public:

int initialize (clientData client[], int clientSize);
void printRecords (clientData client[], int clientSize);
int delRecArray (clientData client[], int size);
void printSingleRec (clientData client[], int element);
int IDSearch (clientData client[], int clientLength, int targetID);
int addRecArray (clientData client[], int last);

private:
clientData clientRecords[20];
string people;
};

Errors that are bugging:

path\bankheader.h(21) : error C2146: syntax error : missing ';' before identifier 'people'
path\bankheader.h(21) : error C2501: 'string' : missing storage-class or type specifiers
path\bankheader.h(21) : error C2501: 'people' : missing storage-class or type specifiers

Suggestions will be greatly appreciated!

Thanks
Andre
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 63
Reputation: marinme is an unknown quantity at this point 
Solved Threads: 1
marinme marinme is offline Offline
Junior Poster in Training

Re: Header File

 
0
  #2
May 1st, 2005
Looks like you're missing the string library...
  1. #include <string>
  2. using std::string;
Yeah... I'm lazy. Deal with it.
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 3
Reputation: amarigny is an unknown quantity at this point 
Solved Threads: 0
amarigny amarigny is offline Offline
Newbie Poster

Re: Header File

 
0
  #3
May 1st, 2005
Originally Posted by marinme
Looks like you're missing the string library...
  1. #include <string>
  2. using std::string;
Thank you for the reply, I have tried to put in the string header as well but I still got the same errors.

Andre
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 3
Reputation: amarigny is an unknown quantity at this point 
Solved Threads: 0
amarigny amarigny is offline Offline
Newbie Poster

Re: Header File

 
0
  #4
May 1st, 2005
Originally Posted by marinme
Looks like you're missing the string library...
  1. #include <string>
  2. using std::string;
Sorry my apologies, I only did the #include and not the "using std::string;"

Thank you for your help.

Take care,

André
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC