delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/24/21:58:41

Message-ID: <36329321.21F4ACAD@montana.com>
Date: Sat, 24 Oct 1998 20:55:29 -0600
From: bowman <bowman AT montana DOT com>
X-Mailer: Mozilla 4.5b2 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: construction has been delayed due to somebody's stupidity (most
likely my own)
References: <5zeY1.843$SI2 DOT 270 AT news DOT cwix DOT com> <gunaalubzrpbz DOT f1bmi21 DOT pminews AT news DOT avnl1 DOT nj DOT home DOT com> <3631E505 DOT 4773CBD3 AT montana DOT com> <gunaalubzrpbz DOT f1cmla2 DOT pminews AT news DOT avnl1 DOT nj DOT home DOT com>
Reply-To: djgpp AT delorie DOT com


Mike Ruskai wrote:
> 
> >int main(void)
> >{
> >       MyClass instance();  // point of interest
> >       instance.say_hi();
> >}
> This is bad because you're declaring a function instead of defining a
> variable.

sigh. yes, one too many cut and pastes. Make that three ways not to do
it.
It is interesting that one can declare a function returning MyClass,
never define or
use it, and the compiler never says a word, while it will emit warnings
for used 
variables.

so much for malformed code and compiler oddities. I hope the original
poster got
his problem solved.

- Raw text -


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