Nand2Tetris Questions and Answers Forum
›
Operating System
›
Project 12
Search
everywhere
only in this topic
Advanced Search
not defined as any kind of variable
Classic
List
Threaded
♦
♦
Locked
2 messages
Mikey2520
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
not defined as any kind of variable
I initialized twoToThe variable but it doesn't pass compiler.
cadet1620
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: not defined as any kind of variable
Administrator
Because init() is a
function
it cannot access
field
variables in the Math class.
twoToThe needs to be a
static
variable.
--Mark
Free forum by Nabble
Edit this page