Menu

Qualified member functions

2003-06-09
2003-06-09
  • Michael Jarvis

    Michael Jarvis - 2003-06-09

    When you define a class, you are not supposed to qualify the member function names.  GNU g++ permits this behavior but other compilers do not.

    For example, in the Chunk class, you have something like this:

    class Chunk {
        // constructor
        Chunk::Chunk();
        ...
    };

    There is no need for the "Chunk::" since if it's a member function it MUST belong to Chunk.

     
    • Marc Bumble

      Marc Bumble - 2003-06-09

      Fixed that one and a couple of other qualified members in
      another class same file.  Fixes are available from CVS.

      Marc

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.