목록전체 글 (418)
Creative Code
※main.cpp파일 #include #include "stack.h" int main() { Stack s1(10); Stack s2(100); s1.push(100); //구조체 자료는 인자를 전달할 때 오버헤드를 줄이기 위해 포인터를 쓴다. s1.push(200); s1.push(300); std::cout
※main.cpp파일 #include #include "stack.h" int main() { Stack s1(10); Stack s2(100); s1.push(100); //구조체 자료는 인자를 전달할 때 오버헤드를 줄이기 위해 포인터를 쓴다. s1.push(200); s1.push(300); std::cout
https://www.acmicpc.net/problem/7869 7869번: 두 원 첫째 줄에 두 원의 중심과 반지름 x1, y1, r1, x2, y2, r2가 주어진다. 실수는 최대 소수점 둘째자리까지 주어진다. www.acmicpc.net #include #include #include #include #define PI 3.14159265358979 using namespace std; int main() { double x1, y1, r1, x2, y2, r2; cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2; cout
※main.cpp파일 #include #include "array.h" int main() { std::cout
※main.cpp파일 #include #include #include "list.h" int main(void) { List list; //initList(); list.insertFirstNode(4); //[4] std::cout next; Node *ptr2 = this->ptr; while (ptr){ if (ptr->data == data){ break; } ptr = ptr->next; ptr2 = ptr2 ->next; } if (ptr){ ptr2->next = ptr->next; delete ptr; } }
※main.cpp파일 #include #include "string.h" int main() { String s1; String s2 = "hello, world"; // String s2("hello,world"); //String s2 = 0;// NULL String s3 = s2; // String s3(s2); s1 = s2; String s4 = " IoT"; s1 = s2 + s4; s1 = "hello, "; //String tmp("hello, "); if (s1 == s2) std::cout