class2 C++ 기초 static변수 최다 최소 구하기 / 여러 번 정의된 기호가 있습니다.LNK1169 LNK2005 Student.h #pragma once#include #include using namespace std; class Student { string name; int kor, math, eng, avr; public:static int count;Student();double getAvr();string getName();static int getcount() { return count; }~Student() {}}; Student.cpp #include "Student.h"#include using namespace std; Student ::Student(){cout > name;cout > kor;cout > math;cout > eng;++count;//생성시 증가} double Student .. 2019. 1. 16. C++ coding training function, array, class[c++ 코딩연습: 함수, 배열, 클래스, 프로토타입 헤더 분리] 문제(요구사항):메시지를 3개 정도 입력해서 연결이 된 상태(connect) 에서 play()로 메시지 출력 play(2) 해당 위치의 메시지movePos 출력할 위치 옮기기, msgdelete() 해당 위치 메시지 제거 disconnect() 시 play()호출 하면 출력 불가 메시지-제시된 main 함수는 기본적인 테스트 용 이므로, 메인 문 추가코드 작성 aam.h#include using namespace std; class AAM {string text; public:void connect();void record();int play();int play(int n);int getMsgNum();void movePos(int n);void msgdelete();void disconnect();};.. 2019. 1. 12. 이전 1 다음