1 概述
通過使用VisualStudio2017來編寫C語言版本的helloworld程序,然后上傳至GitHub
2 VisualStudio2017安裝GitHub插件
前提條件:
必須完成VisualStudio2017企業版的安裝
必須完成GitHub賬號的申請
2.1 啟動VisualStudio並找到擴展和更新菜單
2.2 聯機搜索GitHub插件並下載
2.3 安裝GitHub插件
安裝成功示意圖:
立即重啟便可以用GitHub插件的功能了
3 GitHub在VisualStudio2017中的使用
3.1 登陸GitHub
3.2 創建GitHub倉庫
3.3 上傳項目至GitHub
當C語言版本的項目編寫完成之后就可以將項目的代碼上傳至GitHub咯
首先設置提交用戶名和郵箱信息
然后編寫提交說明信息
同步到遠程GitHub服務器
查看同步后的結果
4 使用VisualStudio2017實現C語言版本HelloWorld
4.1 創建C語言的項目
VisualStudio2017中選擇VisualC++模板的空項目
4.2 創建篩選器,用於存放頭文件
4.3 創建共通的頭文件
共通頭文件common.h的內容
#pragma once #include<stdio.h> #include<stdlib.h>
- 1
- 2
- 3
4.4 源文件helloworld.c的實現
helloworld.c源文件的源碼
#include "common.h" //引入共通的頭文件 /* 使用VisualStudio2017開發的第一個C語言程序 @author tony tonytimemachine@gmail.com @since 2016年12月26日 */ void main() { printf("Hello World in Windows10 With VisualStudio2017 Enterprise"); getchar(); //等待輸入任意字符退出程序 }
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
4.5 helloworld程序運行示意圖:
https://blog.csdn.net/ITTechnologyHome/article/details/53891087