www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/23/21:05:27

From: NG Chi Fai <cfng1 AT netvigator DOT com>
Newsgroups: comp.os.msdos.djgpp,comp.lang.c++
Subject: Help : warning invalid initializer
Date: Sun, 23 May 1999 17:09:40 -0700
Organization: oronet, Penn Valley, C
Lines: 28
Message-ID: <374898C3.AD7EB7FC@netvigator.com>
NNTP-Posting-Host: gv1-246.oro.net
Mime-Version: 1.0
X-Server-Date: 24 May 1999 00:10:22 GMT
X-Mailer: Mozilla 4.51 [en] (Win95; I)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello all,

I encountered the below problem with my code listed below. But I have no
idea of what does it mean by "invalid initializer"

egcs1.1.2 (DJGPP) warning message:
IOTable.hpp:11: ANSI C++ forbids in-class initialization of non-const
static member `IOTableIdentifiers'
IOTable.hpp:11: invalid initializer

-- source code  IOTable.hpp --
#ifndef __CF_CLASSIOTABLE__
#define __CF_CLASSIOTABLE__
// ... some #include here 

class IOTable
{
	private:
	static const char*
IOTableIdentifiers[]={"A","B","C","D","E","F,"G","H","I","J","K","L","M","N","O","P",NULL};
// line 11
	static const char* const IdentifierSuffix="_S";
// ... lines follows
};

Thanks in advance.

NG Chi Fai

- Raw text -


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