public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Syntax Problem
@ 2006-10-26 18:49 Joe Hayes
  2006-10-26 19:51 ` Brian Budge
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Hayes @ 2006-10-26 18:49 UTC (permalink / raw)
  To: gcc-help

I have a header file defined as follows: 

//commodity.h
#include <string>

#ifndef COMMODITY_H
#define COMMODITY_H
class Commodity
{
  long commId;
  string description;
  string manufacturerId;

public:
  Commodity(void);
  Commodity(long cId, string descrip, string mfgId);
  void setCommodityId(long cId);
  void setDescription(string descrip);
  void setManufacturerId(string mfgId);
  long getCommodityId(void);
  string getDescription(void);
  string getManufacturerId(void);
};
#endif

And I have another file that makes use of this header file:

//driver.cpp
#include "commodity.h"
int main()
{
 return 0;
}

But when I try to compile, I receive the error:

syntax error : missing ';' before identifier 'description

Along with many other errors. I have tried everything I can think of, and I
still cannot find the error...any suggestions?


Thanks for your help,
Joe

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-10-30  4:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-26 18:49 Syntax Problem Joe Hayes
2006-10-26 19:51 ` Brian Budge
2006-10-27 10:20   ` Steffen Wendzel
2006-10-29 11:37     ` Issue group ranjith kumar
2006-10-30  4:13       ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).