Click here to Skip to main content
15,748,559 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Binary File IO [modified] Pin
Joe Woodbury23-Jun-06 9:25
professionalJoe Woodbury23-Jun-06 9:25 
GeneralRe: Binary File IO Pin
Jumpin' Jeff23-Jun-06 9:50
Jumpin' Jeff23-Jun-06 9:50 
GeneralRe: Binary File IO Pin
David Crow23-Jun-06 9:55
David Crow23-Jun-06 9:55 
GeneralRe: Binary File IO Pin
Jumpin' Jeff23-Jun-06 9:59
Jumpin' Jeff23-Jun-06 9:59 
GeneralRe: Binary File IO Pin
Joe Woodbury23-Jun-06 10:37
professionalJoe Woodbury23-Jun-06 10:37 
QuestionEntry Points into Exe files Pin
Hibelton23-Jun-06 8:53
Hibelton23-Jun-06 8:53 
AnswerRe: Entry Points into Exe files Pin
ovidiucucu24-Jun-06 7:22
ovidiucucu24-Jun-06 7:22 
QuestionPointers [modified] Pin
Jay0323-Jun-06 8:16
Jay0323-Jun-06 8:16 
Can someone tell me what is going on in the ObjectRoot constructor and also how the ObjectRootPtr is declared. Is the pointer pointing to a new array called ms_instances of size 21 and assigns a value of NULL to all ms_instance[0], ms_instance[1],.....ms_instance[20].....

PS: WHAT DOES THE SECOND LINE MEAN .... ARE YOU MAKING THE POINTER ObjectRootPtr point to class member ms_instances of size 21. I thought it was something like ObjectRootPtr = new ms_instances;

typedef ObjectRoot* ObjectRootPtr; <br />
static ObjectRootPtr ms_instances[MAX_INSTANCES];<br />
<br />
//! Static variable definition<br />
RTI::RTIambassador*          ObjectRoot::ms_rtiAmb     = NULL;   <br />
RTI::ObjectClassHandle       ObjectRoot::ms_classId    = 0;<br />
const char*                  ObjectRoot::ms_classIdStr = NULL;<br />
<br />
ObjectRootPtr   ObjectRoot::ms_instances[MAX_INSTANCES] =  // MAX_INSTANCES = 21<br />
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,<br />
  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };<br />
unsigned int ObjectRoot::ms_numInstances = 0;<br />
<br />
ObjectRoot::ObjectRoot()<br />
{<br />
 //! Add this new object to the extent (collection) of all instances.<br />
   if (ms_numInstances < MAX_INSTANCES)  // ms_numInstances < 21<br />
      ObjectRoot::ms_instances[ ObjectRoot::ms_numInstances++ ] = this;<br />
}


-- modified at 14:19 Friday 23rd June, 2006
AnswerRe: Pointers Pin
Jun Du23-Jun-06 8:52
Jun Du23-Jun-06 8:52 
GeneralRe: Pointers Pin
Jay0323-Jun-06 9:19
Jay0323-Jun-06 9:19 
GeneralRe: Pointers Pin
Zac Howland23-Jun-06 10:08
Zac Howland23-Jun-06 10:08 
GeneralRe: Pointers Pin
Jun Du23-Jun-06 10:30
Jun Du23-Jun-06 10:30 
GeneralRe: Pointers Pin
Jun Du23-Jun-06 10:15
Jun Du23-Jun-06 10:15 
Questionaccessing an ftp server Pin
LCI23-Jun-06 8:15
LCI23-Jun-06 8:15 
AnswerRe: accessing an ftp server [modified] Pin
LCI23-Jun-06 10:39
LCI23-Jun-06 10:39 
QuestionTrapping the Mouse Pin
Scott P. Chapman23-Jun-06 7:42
Scott P. Chapman23-Jun-06 7:42 
QuestionNetscape plugin question (C++) Pin
Dennis Gourjii23-Jun-06 7:14
Dennis Gourjii23-Jun-06 7:14 
Questiontwo toolBars side by side Pin
LeeeNN23-Jun-06 7:14
LeeeNN23-Jun-06 7:14 
AnswerRe: two toolBars side by side [modified] Pin
ovidiucucu24-Jun-06 6:33
ovidiucucu24-Jun-06 6:33 
GeneralRe: two toolBars side by side Pin
LeeeNN24-Jun-06 13:12
LeeeNN24-Jun-06 13:12 
Questionmodules Pin
Tara1423-Jun-06 5:55
Tara1423-Jun-06 5:55 
AnswerRe: modules Pin
Jun Du23-Jun-06 5:56
Jun Du23-Jun-06 5:56 
QuestionRe: modules Pin
Tara1423-Jun-06 6:00
Tara1423-Jun-06 6:00 
AnswerRe: modules Pin
Zac Howland23-Jun-06 6:08
Zac Howland23-Jun-06 6:08 
GeneralRe: modules Pin
Tara1423-Jun-06 6:18
Tara1423-Jun-06 6:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.