Syntax

Hello,
I have a class object name Function_Data, and I want to create any such object locally (so I will know when the function ends and it was destroyed), but also to keep track of which other object created it. The problem is that the object created inside a user code (I'm implementing some peusdo debugger, only with text warnings), so it does not have the "this" pointer. I thought perhaps some like:

Func_Stack_Vect.push_back(Function_Data Curr_Func( __VA_ARGS__))

will solve my problem...but it a syntax error:

'Function_Data' : illegal use of this type as an expression
see declaration of 'Function_Data' (I also tried it with pointers and it didn't work also). Does this (if written right) actually creates a LOCAL object of type
Function_Data? And how do I write it cirrectly?
thanks and regards.
Last edited on
Topic archived. No new replies allowed.