It works fine in Visual Studio Community 2015 on Windows, but it fails using gnu on Linux. The error is:
nsi@nsi-ThinkPad-T540p:~/Documents/UNDEX/timer$ g++ -o example example.cpp
example.cpp: In function ‘int main()’:
example.cpp:30:34: error: ‘ctime_s’ was not declared in this scope
ctime_s(str, sizeof str, &start);
^
Any idea how I need to modify so that it works in both Linux gnu and VS? Many thanks!