RDTSC on VisualStudio 2010 Express - C++ does not support default-int

后端 未结 3 829
不知归路
不知归路 2020-12-21 15:37

I tried to test rdtsc on VisualStudio 2010. Heres my code:

#include 
#include 
#include 
using          


        
3条回答
  •  北海茫月
    2020-12-21 16:11

    You have not included stdint.h/cstdint at the top apparently. This will work:

    #include 
    #include 
    #include 
    #include 
    using namespace std;
    
    uint64_t rdtsc()
    {
        return __rdtsc();
    }
    
    int main()
    {
        cout << rdtsc() << "\n";
        cin.get();
        return 0;
    }
    

提交回复
热议问题