Stupid compiler error

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2005
Posts: 11
Reputation: levk is an unknown quantity at this point 
Solved Threads: 0
levk levk is offline Offline
Newbie Poster

Stupid compiler error

 
0
  #1
Aug 12th, 2005
this is probably something extremely stupid but I can't fix it no matter what I try

I have a "Service.h" file that looks like this:

  1. #ifndef _SERVICE_H__
  2. #define _SERVICE_H__
  3.  
  4. #include "nm.h"
  5. #include "ServiceProvider.h"
  6.  
  7. class Service
  8. {
  9. public:
  10. virtual ULONG register(ServiceProvider *sp);
  11. };
  12.  
  13. #endif

gcc gives me error: /export/home/levk/r2/Service.h:10: error: parse error before `*' token

Here's my whole ServiceProvider.h:

  1. #ifndef _SERVICEPROVIDER_H__
  2. #define _SERVICEPROVIDER_H__
  3.  
  4. #include "ace/Reactor.h"
  5.  
  6. typedef ACE_Reactor ServiceProvider;
  7.  
  8. #endif
<< moderator edit: added [code][/code] tags >> - thank you, I was wondering how to do that

ULONG is int (#define ULONG int in nm.h). I've tried not having any arguments for the register function (so I put void there), but I get the same error except it says it's before the void token.

Please help. Thank you in advance
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 11
Reputation: levk is an unknown quantity at this point 
Solved Threads: 0
levk levk is offline Offline
Newbie Poster

Re: Stupid compiler error

 
0
  #2
Aug 12th, 2005
I figured it out. As predicted, it was unspeakably stupid. I can't call a function register because it's a keyword.
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



Tag cloud for C
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC