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
原因:没有禁用头文件的预处理功能,解决办法如下: