www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/25/06:00:22

From: gsm77 AT aol DOT com (GSM77)
Newsgroups: comp.os.msdos.djgpp
Subject: int, char, unsigned Constructors ???
Lines: 43
NNTP-Posting-Host: ladder03.news.aol.com
X-Admin: news AT aol DOT com
Date: 25 Nov 1998 10:59:42 GMT
Organization: AOL, http://www.aol.fr
X-Newsreader: AOL Offline Reader
Message-ID: <19981125055942.19942.00001105@ngol05.aol.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I've got a HUGE problem ...

I use to work under BORLAND C/C++, and i don't understand why this code don't
work under DJGPP.

I didn't find any answer in the FAQs and i'm new in this forum, so forgive me
if you had already answer this problem.

Any Help will be appreciate...

=========================
template <class X> class foo
  {
  X Data;
  public:
    foo() : Data() {}
  };

class noth
  {
  public:
    noth() {}
  };

main( int , char**[], char *[])
  {
  foo<noth> foo1[3];
  foo<int>  foo2[3];

  return 0;
  }
=========================

Borland C++ compil it well with NO warning (All Warnig options : On).

GCC give me the error :
In method `foo<int>::foo()':
incomplete initializer for member `foo<int>::Data' of class `foo<int>' which
has no constructor

KAMY.

- Raw text -


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