Ask your own question, for FREE!
Computer Science 16 Online
OpenStudy (anonymous):

HI WHAT IS THE WAY TO PASS THE OBJECT IN TO THE FUNCTION IN C++ PROG. LANGUAGE.

OpenStudy (anonymous):

void foo(string& ref) { for(int i = 0; i < bar.size(); ++i) { std::cout << ref.at(i) << std::endl; } } string bar = "bar"; foo(bar);

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!