<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2448.0">
<TITLE>RE: [LC++]static const char*</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>> That's strange, AFAIK it should complain in the same manner in both</FONT>
<BR><FONT SIZE=2>> cases. This is Java-like syntax, C++ doesn't work this way.</FONT>
</P>
<P><FONT SIZE=2>It's valid, but rather new. It's there to avoid people defining</FONT>
<BR><FONT SIZE=2>anonymous enums, and is quite useful for things like:</FONT>
</P>
<P><FONT SIZE=2>template<typename type> class Vector8 {</FONT>
<BR><FONT SIZE=2>public:</FONT>
<BR><FONT SIZE=2> static const int size=8;</FONT>
<BR><FONT SIZE=2> type data[size];</FONT>
<BR><FONT SIZE=2>};</FONT>
</P>
<P><FONT SIZE=2>which would not be possible with the usual static member</FONT>
<BR><FONT SIZE=2>way, since the value of size would not be known at the time</FONT>
<BR><FONT SIZE=2>of compiling the class definition.</FONT>
</P>
<P><FONT SIZE=2>-- </FONT>
<BR><FONT SIZE=2>Vincent Penquerc'h </FONT>
</P>
</BODY>
</HTML>