www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/02/19:49:17

From: Tianmiao Hu Family <thu AT mailhost DOT tcs DOT tulane DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: A question about C++ language!
Date: Sat, 02 Aug 1997 16:59:06 -0500
Organization: Tulane University
Lines: 21
Message-ID: <33E3ADA9.D59DD86C@mailhost.tcs.tulane.edu>
NNTP-Posting-Host: dialup113.tcs.tulane.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hello,

What does "double g() const;" line in the following code mean? Is it
different from the next line "double g();"? This is an example from a
book called "Scientific and Engineering C++:
   An Introduction with Advanced Techniques and Examples". I have tried
to compile it under DJGPP and it passed. I don't understand why "const"
can appear after "g()"?


class B {
    double g() const;
    double g();
    double g(int);
    void h();
};

Thank you for your great help!

Tianmiao Hu

- Raw text -


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