not defined as any kind of variable

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

not defined as any kind of variable

Mikey2520
I initialized twoToThe variable but it doesn't pass compiler.
Reply | Threaded
Open this post in threaded view
|

Re: not defined as any kind of variable

cadet1620
Administrator
Because init() is a function it cannot access field variables in the Math class.

twoToThe needs to be a static variable.

--Mark