0
variable name is used prior to its definition?
The variable name seems used before its definition in this class. Why?
3 Answers
+ 3
can you paste the code?
+ 1
In C++ before the usage of variable we need to declare to make the compiler familiar about the variable.
The compiler will compile the code at that time if the variable is not declared before definition then it will throw compiler exception.
But in java we can declare variable where ever we want and in C++ it should be at the beginning of program that is after header and macros.
+ 1
it is not normal. could you show us the code?