void printOutput(std::string text);
void printOutput(std::string& text);
どちらの関数もコンソールにテキストを出力しますが、次の場合にそれぞれ処理したいと思いました。
std::string testOutput = "asdf";
output->printOutput(testOutput); // Gives the error as it can use either function
場合によっては、次のことが必要になる場合があります。
output->printOutput("asdf"); // Only the first function can be used
これはすべて新しいことですが、これを処理する方法はありますか?