Error CXX0069 variable needs stack frame
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Error CXX0069 variable needs stack frame

  1. #1
    Join Date
    Dec 2008
    Posts
    26

    Exclamation 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.

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Fairfax, VA
    Posts
    10,891

    Re: Error CXX0069 variable needs stack frame

    Which line is the error pointing at?

  3. #3
    Join Date
    Dec 2008
    Posts
    26

    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 .

  4. #4
    Join Date
    Apr 1999
    Posts
    27,444

    Re: Error CXX0069 variable needs stack frame

    Quote Originally Posted by munteanu24d View Post
    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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center