190620(3일차) - dynamic_cast, static_cast, const_cast, reinterpret_cast 교육을 받으면서 노트필기 했던 내용을 날것 그대로 업로드합니다. #include using namespace std; class AAA { int a; protected: int b; public: int c; }; class BBB :public AAA { // private(모든멤버가 private가 되어 상속됨) //| protected 상속 (private를 제외한 모든 멤머가 protected가 됨.) //기본적으로는 public 상속이됩니다. public: int get_b(void) { return b; } }; int main() { BBB obj; cout
190619(2일차) 생성자, 복사생성자, 소멸자 교육을 받으면서 노트필기 했던 내용을 날것 그대로 업로드합니다. #include using namespace std; #include"cstring" class Car2 { int engine; int pipe; int piston; public: Car2() : engine(10), pipe(10), piston(10) {} //Car2(int eg = 10 , int pp =10 , int pt=10) :engine(eg), pipe(pp), piston(pt) {} Car2() {} void print(void) { cout
190617(6일차-end) - 자료구조, sort 교육을 받으면서 노트필기 했던 내용을 날것 그대로 업로드합니다. cf. link(http://soen.kr/) 자료구조 list 1.list - 싱글, 서큘러, 더블, 커널-DL 1-1. sort(버블, 선택, insert->indirect insert->shell, Qsort merge, 직접기수(버킷) 2.stack - compiler 3.queue - deque 4.tree - DL, array(heap:priority Q) 4-4. (tree sort, BST(70%) , ) 5. graph(최소비용, 최단거리 -> A-star:PQ) (DFS, BFS) #퀵소트를 사용해서 정렬하기 #include #include void printInt(int..
190615(5일차) - 구조체, 파일입출력 교육을 받으면서 노트필기 했던 내용을 날것 그대로 업로드합니다. 전처리기 - 복습 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 #include #include #include // malloc 사용시 필요 #pragma warning (disable:4996) main() { char buf[100]; char **p; p = (char**)malloc(sizeof(char*) * 3); // 3개짜리 포인터 배열을 가리키는 포인터. for (int i = 0; i fir* n->sec); } void func3(num n[]) { printf("%d + %d + %d + %d = %d", n..