Skip to content

Instantly share code, notes, and snippets.

@Ah-da-Coder
Created March 16, 2017 13:56
Show Gist options
  • Select an option

  • Save Ah-da-Coder/e582de3b4222e727d58d7bc1ab85bb37 to your computer and use it in GitHub Desktop.

Select an option

Save Ah-da-Coder/e582de3b4222e727d58d7bc1ab85bb37 to your computer and use it in GitHub Desktop.
// ReturnC_003_UserFunction.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//
#include "stdafx.h"
/* プロトタイプ宣言 */
int function_add_one(int num);
int _tmain(int argc, _TCHAR* argv[])
{
/* 変数 */
int num;
/* 初期化 */
num = 1;
/* コンソールに値を表示 */
printf("%d\r\n", num);
/* 値を代入 */
num = function_add_one(num);
/* コンソールに演算後の値を表示 */
printf("%d\r\n", num);
while(1);
return 0;
}
int function_add_one(int num)
{
return num + 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment