<!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++]How to define a static map member?</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>> I am trying to have get a static member of a class to be of type </FONT>
<BR><FONT SIZE=2>> map<const string, pointer*>.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> What is the correct way for doing it?</FONT>
</P>
<P><FONT SIZE=2>Your way is correct, but you haven't defined the variable.</FONT>
<BR><FONT SIZE=2>In one of your cpp files, add:</FONT>
</P>
<P><FONT SIZE=2>map<const string,pointer*> category::allCategories;</FONT>
</P>
<P><FONT SIZE=2>-- </FONT>
<BR><FONT SIZE=2>Vincent Penquerc'h </FONT>
</P>
</BODY>
</HTML>