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

* Re: Syntax Problem
  2006-10-26 18:49 Syntax Problem Joe Hayes
@ 2006-10-26 19:51 ` Brian Budge
  2006-10-27 10:20   ` Steffen Wendzel
  0 siblings, 1 reply; 5+ messages in thread
From: Brian Budge @ 2006-10-26 19:51 UTC (permalink / raw)
  To: Joe Hayes; +Cc: gcc-help

string lives in namespace std.

Try a replace all of "string" with "std::string"

  Brian

On 10/26/06, Joe Hayes <joe_squid@sbcglobal.net> wrote:
> 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

* Re: Syntax Problem
  2006-10-26 19:51 ` Brian Budge
@ 2006-10-27 10:20   ` Steffen Wendzel
  2006-10-29 11:37     ` Issue group ranjith kumar
  0 siblings, 1 reply; 5+ messages in thread
From: Steffen Wendzel @ 2006-10-27 10:20 UTC (permalink / raw)
  To: gcc-help

Or simply use "using namespace std;".

Steffen

-- 
website: http://cdp.doomed-reality.org
hardened linux: http://drlinux.doomed-reality.org

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

* Issue group
  2006-10-27 10:20   ` Steffen Wendzel
@ 2006-10-29 11:37     ` ranjith kumar
  2006-10-30  4:13       ` Ian Lance Taylor
  0 siblings, 1 reply; 5+ messages in thread
From: ranjith kumar @ 2006-10-29 11:37 UTC (permalink / raw)
  To: gcc-help

Hi
   1)What is an "issues group" ?

  I think its definition is :
             " Processors contain more than one
execution units like integer execution unit, floating
exection unit, memory read/write execution
units.....etc.
An issue group is a list of assembly instructions
which can be issued simultaneously to different
execution units at same time so that all execution
units are busy."


Am I right???

2) Compilers can make use of it by reodering
instructions so that all execution units are busy.
Is GCC exploiting such feature????

Thanks in advane.






		
___________________________________________________________ 
Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html

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

* Re: Issue group
  2006-10-29 11:37     ` Issue group ranjith kumar
@ 2006-10-30  4:13       ` Ian Lance Taylor
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Lance Taylor @ 2006-10-30  4:13 UTC (permalink / raw)
  To: ranjith kumar; +Cc: gcc-help

ranjith kumar <ranjit_kumar_b4u@yahoo.co.uk> writes:

>    1)What is an "issues group" ?
> 
>   I think its definition is :
>              " Processors contain more than one
> execution units like integer execution unit, floating
> exection unit, memory read/write execution
> units.....etc.
> An issue group is a list of assembly instructions
> which can be issued simultaneously to different
> execution units at same time so that all execution
> units are busy."
> 
> 
> Am I right???

More or less.  An issue group is a group of instructions which can all
be issued at the same time.  It is not a requirement that *all*
execution units be busy.

> 2) Compilers can make use of it by reodering
> instructions so that all execution units are busy.
> Is GCC exploiting such feature????

In general, this is target dependent: it requires somebody to write
the scheduler description in the MD file.  It has been done for most
targets, though, including all popular targets.

Ian

^ 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).