-
December 12th, 2008, 08:59 AM
#1
Error CXX0069 variable needs stack frame
Hi !
I have this function which i use in order to traverse a quadtree :
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 ;
}
}
I call if from another function :
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.
-
December 12th, 2008, 09:14 AM
#2
Re: Error CXX0069 variable needs stack frame
Which line is the error pointing at?
-
December 12th, 2008, 09:20 AM
#3
Re: Error CXX0069 variable needs stack frame
Code:
void SPMG::traverse(qNode* node ,qNode* trav[] , int& size)
At this line of code , but only at the second iterartion of the function .
-
December 12th, 2008, 09:20 AM
#4
Re: Error CXX0069 variable needs stack frame
Originally Posted by munteanu24d
And i get the following error : CXX0069 variable needs stack frame .
This is a message from the debugger, and is not a compiler or linker error.
Given that it is a debugger message, are you going to change your code so as to make the debugger accept it? If so, that is the wrong approach to writing a program, as you're design is being controlled by what the debugger accepts.
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|