How do I modify a C++ class to display which variable is unitialized? My program accepts an expression and checks, among other things, that all variables are initialized. Currently, it throws an error when there is an unitialized variable, but how to I get it to display that variable that is uninitialzed?
I enter: (x + y), x=2;
It throws an exception and displays:
Error: Uninitialzed variable.
I want it to display which variable is uninitialized:
Error: Uninitialized variable y