I'm having trouble elements from an array and then converting them to its correct code. this assignment asks to use functional decomposition to prompt user for the color of each band then calculates the value of the resistor.
example
color band1: >green
color band2: >blue
color band3: >black
color of multiplier: >orange
color of tolerance: > silver
this resistor has 560000 ohms with 10% tolerance
end example
this code is not complete. still working on the first three colors but when I run the program I get an undefined reference error. can anyone help and distinguish what I'm doing wrong.
OP: if you want to read off the color codes for any given color you may wish to use a std::map with some error checking for non-existent colors. Here is an example: