Hi !
I have this function which i use in order to traverse a quadtree :
I call if from another function :Code:void SPMG::traverse(qNode* node ,qNode* trav[] , int& size) { if(node != NULL ) { traverse(node->child[0],trav,size); traverse(node->child[1],trav,size); traverse(node->child[2],trav,size); traverse(node->child[3],trav,size); trav[size++] = node ; } }
;Code:void SPMG::merge(qNode* rootNode ){ int size = 0; qNode* trav[1000]; traverse(rootNode ,trav ,size); }
And i get the following error : CXX0069 variable needs stack frame .
I have read that this error may be caused by variables declared as part of an inline function . Which might be right in my case , because i declare qNode* trav[] vector in merge function , before to call traverse .
Where should i declare the qNode* trav[] vector ?
I tried to declare it as extern within the class and i get an external unlink error (error LNK2001: unresolved external symbol "class qNode * * trav" ).
Thanks in advance ,
D.M.




Reply With Quote