VERY SIMPLE CODE - Wont work :( timeGetTime()

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
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
Topic archived. No new replies allowed.