Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
christopherhale
christopherhale's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Can't Pass An Argument To An Object's Method
[2 Replies]
24-Dec-2012 08:17 PM
Forum:
Programming Questions
Why can't I pass an argument to the Method of an Object? I get an "unexpected token" error on the last line. Here's some stripped down code to demonstrate.
class Obj {
float vari;
Obj( float tempV ) {
vari = tempV;
}
void setVari( float tempV ) {
vari = tempV;
}
}
Obj Thing = new Obj( 15.0 );
Thing.setVari( 30.0 );
«Prev
Next »
Moderate user : christopherhale
Forum