cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
VERY SIMPLE CODE - Wont work :( timeGetT
VERY SIMPLE CODE - Wont work :( timeGetTime()
Mar 25, 2013 at 5:40am UTC
tomz6
(16)
Why won't this work?
#include <iostream>
#pragma comment(lib, "winmm.lib")
void main(){
double prevTime = timeGetTime();
std::cout << (timeGetTime() - prevTime) << "\n";
}
--
ERROR: error C3861: 'timeGetTime': identifier not found
PS: I'm on Windows 7 using Visual Studio
Thanks in advance
Last edited on
Mar 25, 2013 at 5:41am UTC
Mar 25, 2013 at 6:35am UTC
vlad from moscow
(6539)
You should include the header that contains the declaration of function timeGetTime.
Also take into account that function main shall have return type
int
Last edited on
Mar 25, 2013 at 6:36am UTC
Topic archived. No new replies allowed.