🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Clifford Liem Wed, 05 Aug 1992 22:13
pointers to member functions
#79
Author: Clifford Liem
Date: Wed, 05 Aug 1992 22:13
26 lines
1092 bytes

Pointers to member functions seem to be well documented.
E.g.

  class SampleClass;

  int (SampleClass::*pmf)() = SampleClass::greaterThan;

Why then can I not pass a pointer to a member function as a parameter?
E.g.

  void sort(int (SampleClass::*pmf)());

This crashes with a syntax error (in gnu and cfront).

Anyone ever try this sort of thing??

Cliff
--
       _____    __
      /\____\  /\_\     Cliff Liem    Synthesis and Design of Embedded Systems
     / / ___/ / / /                   Bell-Northern Research, Ottawa, Ontario
    / / /_\  / / /_\    E-mail: cbl@bnr.ca     Phone:  (613)763-5978
    \/____/  \/____/                           Fax:    (613)763-7241
 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads