View Single Post
  #1   Spotlight this post!  
Unread 03-12-2011, 14:36
Stonemotmot Stonemotmot is offline
Registered User
FRC #0486
 
Join Date: Sep 2011
Location: United States, Pa
Posts: 53
Stonemotmot is an unknown quantity at this point
Using a variable as a class object in Windriver/C++

Hello, I am currently working on streamlining our teams code and was wondering if it is possible to use a variable to reference a specific object.
For Example
Say I named a solenoid object 1 and had a int variable named b that stored 1 could i say
b.Set(true) and have the same result as 1.Set(True)
If it cannot be done this way is there another way to get the same result. The key to what I want is to have a numeric value that relates to a specific object.

Thanks for any help in advance.