목록분류 전체보기 (318)
printf("ho_tari\n");
#include "list.h" #include #include int main(void) { List list; //insertFirstNode(&list, 4); // [4] list.insertFirstNode(4); list.printList(); //insertFirstNode(&list, 3); // [3, 4] list.insertFirstNode(3); list.printList(); //insertFirstNode(&list, 1); // [1, 3, 4] list.insertFirstNode(1); list.printList(); //insertNode(&list, 1, 2); // [1, 2, 3, 4] list.insertNode(1, 2); list.printList(); //de..
#include #include "string.h" int main() { String s1; String s2 = "hello, world"; // String s2("hello, world"); //String s2 = 0; String s3 = s2; // String s3(s2); s1 = s2; // s1 = s1; // self assignment?? s1 = "hello, "; // String tmp("hello, "); s1 = tmp; tmp.~String(); String s4 = " IoT"; s1 = s2 + s4; if (s1 == s2) { std::cout str; this->init_str(str); } return *this; } String& String::operato..
#include #include "string.h" int main() { String s1; String s2 = "hello, world"; // String s2("hello, world"); //String s2 = 0; String s3 = s2; // String s3(s2); s1 = s2; // s1 = s1; // self assignment?? s1 = "hello, "; // String tmp("hello, "); s1 = tmp; tmp.~String(); String s4 = " IoT"; s1 = s2 + s4; if (s1 == s2) { std::cout len_ + 1]; assert(buf ); strcpy(buf, rep_->str_); strcat(buf, rhs.r..
#include #include "complex.h" #include int main() { Complex c1; Complex c2 = 3.0; // Complex c2(3.0) Complex c3(3.0, 4.0); const Complex c4 = c3; // const Complex c4(c3) c1.real(c3.real()); c1.imag(c3.imag()); c1 = c3; if (c1 == c3) { std::cout
#include #include "rational.h" int main() { Rational r1; // 0/1 Rational r2 = 1; // 1/1 //Rational r2(1); Rational r3(3, 4); // 3/4 Rational r4 = r3; //r1.setNum(r3.getNum()); //r1.setNum(r3.getNum()); r1 = r3; if (r1 == r3) { std::cout
#include int main() { int a, b; std::cin >> a >> b; // cin.operator >> (a) std::cout