delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/30/08:05:42

From: oferco <oferco AT cs DOT huji DOT ac DOT il>
Newsgroups: comp.os.msdos.djgpp
Subject: Assembler message
Date: Tue, 30 Dec 1997 14:41:31 +0200
Organization: The hebrew University of Jerusalem
Lines: 34
Message-ID: <Pine.SUN.3.96.971230143338.25016A-100000@pita.cs.huji.ac.il>
NNTP-Posting-Host: centauri.cs.huji.ac.il
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hye,
Please anyone who can, answer this:

I have a class:
class A
{
  public:
    typedef short (A::*b)();
    b c[5];
    short d();
};

inside one of few files im my Makefile.
when I run make. I get this message:
Assembler message:
c:/misc/djgpp/tmp\cccaaaaa: Error: Rest of line ignored. last character
is ':'.
and 2 messages of the same.

HOWEVER, when I change the typedef to:
typedef short(*b)();

everything is OK. but when I do this:
c[3] = d;
I get this error message
assignment to 'short (*)()' from 'short (A::*)()'

and I HAVE to put that assignment - I need to have an array of 
pointers to functions in this way.

WHAT SHOULD I DO? 
Thanks,
Ofer

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019