Problem:
Question 1: Design a 3 by 1 multiplexer. Please do not provide cut and paste answers and please include a source.
Question 2: For C++, is there a way to return the index of a vector in a loop?
For example,
for (int i = 0; i < 5; ++i)
v.at(i) = i + 1;
How do I retrieve the index 3 (or any index for that matter) from v.at(3) = 4?
Please provide description of your answers.