使用 Visual Studio 2010 寫 C 語言程式。

Step one:新增 > 專案。

vs-20121216  

Step two:Visual C++ > Win32 主控台應用程式。

vs-20121216-2  

Step three:下一步。

vs201212161733  

Step four:完成。

vs2012161735    

Step five:將原始程式碼底下 *.cpp 副檔名改為 *.c

vs-201212161740

Example Source Code:引入 C 語言標頭檔。

// simple_test.cpp : 定義主控台應用程式的進入點。
//

#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//int main(int argc, char *argv[])
//or
//int _tmain(int argc, _TCHAR* argv[])

int main()

{
      printf("TEST");
      return 0;
}

執行結果:

vs-201212161751  

 

arrow
arrow

    mitblog 發表在 痞客邦 留言(0) 人氣()