0

this is probably something extremely stupid but I can't fix it no matter what I try :sad:

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

1
Contributor
1
Reply
2
Views
12 Years
Discussion Span
Last Post by levk
0

I figured it out. As predicted, it was unspeakably stupid. I can't call a function register because it's a keyword.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.