Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/157.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 错误:整数常量上的后缀Ui64无效_C++_Windows_Gcc_Mingw - Fatal编程技术网

C++ 错误:整数常量上的后缀Ui64无效

C++ 错误:整数常量上的后缀Ui64无效,c++,windows,gcc,mingw,C++,Windows,Gcc,Mingw,我正试图建立和运行这个系统。我正在使用Windows8.1和MinGW以及GCC4.8.1版 这是log4z.cpp代码的一部分 #include "log4z.h" #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <time.h> #include <string.h> #include <string> #include <ve

我正试图建立和运行这个系统。我正在使用Windows8.1和MinGW以及GCC4.8.1版

这是log4z.cpp代码的一部分

#include "log4z.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <time.h>
#include <string.h>

#include <string>
#include <vector>
#include <map>
#include <list>
#include <sstream>
#include <iostream>
#include <fstream>
#include <algorithm>


#ifdef WIN32
#include <io.h>
#include <shlwapi.h>
#include <process.h>
#pragma comment(lib, "shlwapi")
#pragma warning(disable:4996)
#else
#include <unistd.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <sys/socket.h>
#include<pthread.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <dirent.h>
#include <fcntl.h>
#include <semaphore.h>
#endif

...

#ifdef WIN32
        FILETIME ft;
        GetSystemTimeAsFileTime(&ft);
        unsigned long long now = ft.dwHighDateTime;
        now <<= 32;
        now |= ft.dwLowDateTime;
        now /=10;
        now -=11644473600000000Ui64;
        now /=1000;
        pLog->_time = now/1000;
        pLog->_precise = (unsigned int)(now%1000);

...
但是,我有一个带有Ubuntu 13.10和gcc版本4.8.1的虚拟机,它可以工作


我的问题是,我需要任何标志来向编译器指示它吗?我需要包括任何库吗?

正如@Hans\u Passant所说,它可以通过ULL改变Ui64

now -=11644473600000000ULL;

此外,我发现了一些关于这方面的信息

也许这有助于。。。请改用ULL后缀。您需要启用c++11:
-std=c++11
-std=gnu++11
。Ui64是一个文本运算符。看见
now -=11644473600000000ULL;