TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: CLIFF RHODES
from: FRANK MASINGILL
date: 1997-05-14 03:23:00
subject: Creating workable subcla

 > I'll redo
 > your class a bit to do this:
    You will understand the value of your code to me when I tell you that I 
have eight books on C++, the manuals for Turbo C++ 1.00 and 3.00 and ten 
books on C and NONE of them uses this kind of elementary arithmetic example 
to teach the basic approach to C++.
 > float Calc::Divide(void)
 > {
 >    // Overloaded version of Divide() that returns a float value
 > for
 >    // the quotient of the two numbers
 >    if(Num2 != 0)
   My Borland compiler choked on the line below (the only place your code 
where it flagged an error.
 >       return static_cast(Num1) / Num2;
   }
    So I changed it to
        return (float)(Num1) / Num2;
    And the compilation sailed right through.  My IDE help did not identify 
"static_cast" as a keyword or recognize  yet you spoke of this 
expression as though it were C++ terminology.
    If, instead, your intention was simply to call my attention to it in 
order for ME to substitute the correct terminology then happily, I did so.  
Am I correct in assessing your intent here?
    It isn't THAT important right now anyhow.  Thanks to you I now have a 
good pattern.  Thanks.
                            Sincerely,
                                            Frank
--- FMail/386 1.02
---------------
* Origin: Maybe in 5,000 years frankmas@juno.com (1:396/45.12)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.