# Book code error... need help!

## Recommended Posts

Tarpedoe81    122

##### Share on other sites
Gage64    1235
You have posted a very long code listing, most of which is irrelevant to your problem, and you didn't use source tags (read the FAQ if you don't know how), so it's pretty hard to guess the problem. To make it easier for us, step through the program with the debugger, see where the program starts misbehaving (for example, make sure that Function2() is indeed added to the state manager) and report back with more detailed information.

Also, where do you call Process()?

##### Share on other sites
dashurc    236
I did a quick look up on MSDN. It looks like error CXX0017 means the debugger is having problems resolving the name, since it can't properly type cast the variable. Change the following code from:
typedef struct sState { ..   code hidden for simplicity.} sState;

To:

struct sState { ..   code hidden for simplicity.};

since you're using C++ anyways.

I don't know why you'd be running into CX0069 though since it only mentions variables declared in inline functions. It may be because the variable is out of scope or not yet declared (although I don't get that message for either of those situations in my debugger...).

From MSDN:

Expression Evaluator Error CXX0069
variable needs stack frame

The expression evaluator cannot evaluate the variable because it does not occur in a stack frame. This may be caused by variables declared as part of an inline function.

Expression Evaluator Error CXX0017

Error Message

A symbol specified in an expression could not be found.

One possible cause of this error is a case mismatch in the symbol name. Because C and C++ are case-sensitive languages, a symbol name must be given in the exact case in which it is defined in the source.

This error can occur when trying to typecast a variable in order to watch the variable during debugging. The typedef declares a new name for a type, but it does not define a new type. The typecast attempted in the debugger requires the name of a defined type.

This error is identical to CAN0017.

To fix by using the following possible solutions
Make sure the symbol is already declared at the point in the program where it is being used.

Use an actual type name to cast variables in the debugger, rather than a typedef-defined name.