인자 (2) 썸네일형 리스트형 [C++]멤버 초기화 리스트를 사용 - 인자의 사용 12345678910111213141516171819202122232425262728293031323334353637383940414243 #include using namespace std; class NeedConstructor{public: const int maxCount; int& ref; int sample; NeedConstructor(); NeedConstructor(int count, int& number);// 두개의 인자가 있는 생성자 추가 }; NeedConstructor::NeedConstructor(int count, int& number)// 두개의 인자가 있는 생성자 추가 : maxCount(count), ref(number){ sample = 200;} NeedConstru.. [C++]기본적인 인자전달 예제 , 팩토리얼을 구하는 함수 1234567891011121314151617181920212223#include using namespace std; int Factorial (int n); int main(){ int result; result = Factorial(5); cout 이전 1 다음