Programming/C++124 [c++] printf #include int main(void) {int num = 20;std::cout 2017. 5. 10. [C] #ifndef, #endif #include "count.h" int add(int a, int b) {count++;return a + b;}#ifndef _COUNT_H_#define _COUNT_H_ 20int count = 0; #endif#include "count.h" int minus(int a, int b) {count++;return a - b;}/*------------------------------------------------------------------------------------------@ Pratice C laguage Author : SAMCreated : 30-03-2017Modified : 30-03-2017Language/ver : C in MSVS2015 Description : Pr.. 2017. 3. 30. [C] #if #elif #else #endif #includevoid hello(){printf("hello1.h : Hello Everbody \n");}#include void hello() {printf("hello2.h : Hello, Hello! \n");}#include void hello() {printf("hello3.h : Everybody!, Hello?\n");}/*------------------------------------------------------------------------------------------@ Pratice C laguage Author : SAMCreated : 30-03-2017Modified : 30-03-2017Language/ver : C in MSVS2015 Description : P.. 2017. 3. 30. [C] Header file, Main.c, Rink /*------------------------------------------------------------------------------------------ @ Pratice C laguage Author : SAMCreated : 30-03-2017Modified : 30-03-2017Language/ver : C in MSVS2015 Description : PracticeKEYWORD : Caculator header file------------------------------------------------------------------------------------------*/ extern int cal_num; double add(double a, double b);double.. 2017. 3. 30. [C] Module, rink /*------------------------------------------------------------------------------------------ @ Pratice C laguage Author : SAMCreated : 30-03-2017Modified : 30-03-2017Language/ver : C in MSVS2015 Description : PracticeKEYWORD : Module, headear file ------------------------------------------------------------------------------------------*/ int cal_num = 0; double add(double a, double b) {cal_num+.. 2017. 3. 30. [C] Module /*------------------------------------------------------------------------------------------ @ Pratice C laguage Author : SAMCreated : 30-03-2017Modified : 30-03-2017Language/ver : C in MSVS2015 Description : PracticeKEYWORD : Module ------------------------------------------------------------------------------------------*/ int i = 0; /*----------------------------------------------------------.. 2017. 3. 30. [C] Macro, Predef /*------------------------------------------------------------------------------------------@ Pratice C laguage Author : SAMCreated : 29-03-2017Modified : 29-03-2017Language/ver : C in MSVS2015 Description : PracticeKEYWORD : Macro, Predef------------------------------------------------------------------------------------------*/ #include int main(void) {printf("line number : %d\n", __LINE__);pr.. 2017. 3. 29. [C] Memory Token /*------------------------------------------------------------------------------------------@ Pratice C laguage Author : SAMCreated : 29-03-2017Modified : 29-03-2017Language/ver : C in MSVS2015 Description : PracticeKEYWORD : Macro, Token------------------------------------------------------------------------------------------*/ #include #define CONCAT(a,b) a##b int main(void) {int arr[2] = { 10.. 2017. 3. 29. [C] Macro, Charicter, Constant /*------------------------------------------------------------------------------------------@ Pratice C laguage Author : SAMCreated : 29-03-2017Modified : 29-03-2017Language/ver : C in MSVS2015 Description : PracticeKEYWORD : Macro, Constant, Preprocessor ------------------------------------------------------------------------------------------*/ #include #define ADD(x,y) printf("x+y=%d\n", x+y).. 2017. 3. 29. [C] Macro, comp Funtion /*------------------------------------------------------------------------------------------@ Pratice C laguage Author : SAMCreated : 29-03-2017Modified : 29-03-2017Language/ver : C in MSVS2015 Description : PracticeKEYWORD : Macro, Constant, Preprocessor ------------------------------------------------------------------------------------------*/ #include #define SQUARE(x) x*xint square(int x); .. 2017. 3. 29. 이전 1 ··· 5 6 7 8 9 10 11 ··· 13 다음