www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/24/01:46:31

From: "Jason Glass" <empirepaper AT cwix DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: construction has been delayed due to somebody's stupidity (most likely my own)
Lines: 29
X-Newsreader: Microsoft Outlook Express 4.72.2106.4
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Message-ID: <5zeY1.843$SI2.270@news.cwix.com>
Date: Sat, 24 Oct 1998 00:47:19 -0600
NNTP-Posting-Host: 166.55.6.83
X-Trace: news.cwix.com 909210945 166.55.6.83 (Sat, 24 Oct 1998 06:35:45 GMT)
NNTP-Posting-Date: Sat, 24 Oct 1998 06:35:45 GMT
Organization: CWIX
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

hey...

my simple question is, when i do the following (as an example):

class MyClass {
public:
   MyClass();
protected:
   int data;
};

void main()
{
   MyClass instance();  // point of interest
}

on the line in question, it tries to accept 'instance()' as a classname, and
it totally misses the concept that it might be trying to construct the
class.  the only way i can get this to work is by declaring a class pointer
object and initializing it, then destroying it at the end manually.  i have
not had this problem in other dos compilers, though i HAVE had this sample
problem with linux gcc (ooh.. big surprise.. :)

anyways, could somebody please tell me what's going on..  thanks a bunch.

jason glass



- Raw text -


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