1.新建C/C++項目
以下鏈接詳細地介紹瞭如何在VS2015中建立C/C++項目以及如何對程序進行編譯、運行。
http://www.cnblogs.com/yankyblogs/p/7058036.html
2.程序調試
VS中程序調試,各版本基本差不多,簡單來說爲:打斷點--F5進入調試--F11分步調試(即遇到函數會進入函數內部進行調試)--F10分步驟調試,下面鏈接做了具體的介紹:
https://jingyan.baidu.com/article/1709ad808ad29f4634c4f00b.html
3. cannot open source file “unistd.h”
(1)將下面內容保存爲unistd.h
#ifndef _UNISTD_H
#define _UNISTD_H
#include <io.h>
#include <process.h>
#endif
(2)將上面生成的unistd.h放入到VS2015的頭文件中,例如D:\Vs2015\VC\include
參考鏈接:https://blog.csdn.net/sinat_36053757/article/details/68487662?locationNum=3&fps=1
https://download.csdn.net/download/panpan_jiang1/10301525
4.cannot open source file”pnh”
參考鏈接:https://www.cnblogs.com/riddick/p/7512618.html
5.c4996: 'fopen': This function or variable may be unsafe
參考鏈接:https://blog.csdn.net/zhangyuehuan/article/details/12012635
6.warning C4627:Add directive to 'StdAfx.h' or rebuild precompiled header
原因:沒有禁用頭文件的預處理功能,解決辦法如下: