User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 391,593 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,665 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser:
Views: 863 | Replies: 1
Reply
Join Date: Aug 2005
Posts: 11
Reputation: levk is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
levk levk is offline Offline
Newbie Poster

Stupid compiler error

  #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:

#ifndef _SERVICE_H__
#define _SERVICE_H__

#include "nm.h"
#include "ServiceProvider.h"

class Service
{
 public:
  virtual ULONG register(ServiceProvider *sp);
};

#endif

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

Here's my whole ServiceProvider.h:

#ifndef _SERVICEPROVIDER_H__
#define _SERVICEPROVIDER_H__

#include "ace/Reactor.h"

typedef ACE_Reactor ServiceProvider;

#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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Posts: 11
Reputation: levk is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
levk levk is offline Offline
Newbie Poster

Re: Stupid compiler error

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb C Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the C Forum

All times are GMT -4. The time now is 11:31 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC