|
Re: Using a variable as a class object in Windriver/C++
It does, at the penalty of having a fixed number of spots with fixed names to map to unless additional code is written.
To be clear, I was referring to the data type map, not necessarily the c++ implementation. I can count at least 8 ways in C++ to implement the map with varying degrees of effectiveness, map and hash_map (assuming that library is included in Windriver by default) being the most flexible with mapping names.
Point being, the map structure could accept any valid integer and associate the corresponding solenoid with it; with an array, you are forced to associate a solenoid with a specific value from 0 to size - 1.
__________________
Attending: MN Duluth Regional
|