954,176 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Stupid compiler error

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

levk
Newbie Poster
11 posts since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

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

levk
Newbie Poster
11 posts since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You