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
이 모든 것보다 새로운 것은 어떻게 처리 할 수 있습니까? const를 참조하여
두 기능이 출력 외에 다른 작업을 수행합니까? –