Programming399 [c++] NameAlias #include using namespace std; namespace AAA{namespace BBB{namespace CCC{int num1;int num2;}}} int main(void){AAA::BBB::CCC::num1 = 20;AAA::BBB::CCC::num2 = 30; namespace ABC = AAA::BBB::CCC;cout 2017. 5. 11. [c++] UsingNamespace #include namespace Hybrid{void HybFunc(void){std::cout 2017. 5. 11. [c++] NameSpace3 #include namespace BestComImp1{void SimpleFunc(void);} namespace BestComImp1{void PrettyFunc(void);} namespace ProgComImp1{void SimpleFunc(void);} int main(void){BestComImp1::SimpleFunc();return 0;} void BestComImp1::SimpleFunc(void) {std::cout 2017. 5. 11. [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. 이전 1 ··· 30 31 32 33 34 35 36 ··· 40 다음