명품 C++ programming 10장 실습문제 7번


명품 C++ programming 10장 실습문제 7번

문제 다음 프로그램은 컴파일 오류가 발생한다. 소스의 어디에서 왜 컴파일 오류가 발생하는가? 123456789101112131415161718192021222324#include <iostream>using namespace std; class Circle { int radius;public: Circle(int radius = 1) { this->radius = radius; } int getRadius() { return radius; }}; template <class T>T bigger(T a, T b) { // 두 개의 매개 변수를 비교하여 큰 값을 리턴 if (a > b) return a; else return b;} int main() { int a = 20, b = 50, c; c = bigger(a, b); cout << "20과 50중 큰 값은 " << c << endl; Circle waffle(10), pizza(20), y; y = bigger(waffle, pizz..........



원문링크 : 명품 C++ programming 10장 실습문제 7번