Programming/C++124 [c++] NameSpace2 #include namespace BestComImp1{void SimpleFunc(void);} namespace ProgComImp1{void SimpleFunc(void);} int main(void){BestComImp1::SimpleFunc();ProgComImp1::SimpleFunc();return 0;} void BestComImp1::SimpleFunc(void) {std::cout 2017. 5. 11. [c++] namespace #include namespace BestComImp1{void SimpleFunc(void){std::cout 2017. 5. 11. [c++] tempalte <typename T> #include template inline T SQUARE(T x){return x*x;} int main(void){std::cout 2017. 5. 11. [c++] inline Function #include inline int SQUARE(int x){return x*x;} int main(void){std::cout 2017. 5. 11. [c++] DefaultValue3 #include int BoxVolume(int length, int width = 1, int height = 1); int main(void) {std::cout 2017. 5. 11. [c++] DefaultValue2 #include int Adder(int num1 = 1, int num2 = 2); int main(void) {std::cout 2017. 5. 11. [c++] Default Value #include int Adder(int num1 = 1, int num2 = 2){return num1 + num2;} int main(void) {std::cout 2017. 5. 11. [c++] Function Overloading #include void MyFunc(void){std::cout 2017. 5. 11. [c++] char name[100] #include int main(void) { char name[100];char lang[200]; std::cout > name; std::cout > lang; std::cout 2017. 5. 11. [c++] std::cin>> #include int main(void) { int val1;std::cout > val1; int val2;std::cout > val2; int result = val1 + val2;std::cout val1 >> val2; if (val1 < val2){for (int i = val1 + 1; i < val2; i++)result += i;}else{for (int i = val2 + 1; i < val1; i++)result += i;} std::cout 2017. 5. 11. 이전 1 ··· 4 5 6 7 8 9 10 ··· 13 다음