Due to the needs of the paper, it is more appropriate to use the C language to compare the running time of some basic operations, so the following are the steps to write the C language in vs2015.
First, open vs2015 and select New Project
Then the interface for creating a new project appears, select the VC++ writing environment, and click OK.
Click Next
Select Empty Project
The project has been built, right-click the source file to add a new item.
And the name is .c suffix After
editing , pay attention to press ctrl+F5, otherwise the program box "flashes" will appear.
If you want to calculate the program running time,
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main()
{
clock_t begin, end;
double cost;
//开始记录
begin = clock();
/*待测试程序段*/
printf("hello world!\n");
//结束记录
end = clock();
cost = (double)(end - begin)/CLOCKS_PER_SEC;
printf("constant CLOCKS_PER_SEC is: %ld, time cost is: %lf secs", CLOCKS_PER_SEC, cost);
}