1. linux int snprintf(char *restrict buf, size_t n, const char * restrict format, ...); windows int _snprintf( 2. 头文件都是string. h 3. linux环境下是:vsnprintf
4. windows下winsock.h/winsock2.h 5. write windows头文件 6. socklen_t 1)#include <sys/socket.h> __attribute__((unused)) 告诉编译器这个函数可能不用,不需要报warning错误 decltype是根据变量推导获取出变量的类型
|
10.error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 这是因为在VC6中,若是没有显示的指定返回值类型,编译器将其视为默认整型。然则vs2005不支撑默认整型。 解决办法如下: 打开:项目----项目属性----设备属性----C/C++----号令行,在附加选项那边添加/wd4430这个选项 11. windows socket头文件的错误 正确引用顺序 //#include <winsock.h> #include<Winsock2.h> #include <ws2tcpip.h> 12. 原子操作 windows InterlockedXXXX 13. class Node{ private: friend class List; friend class _ListIterator; } template<typename U,template <class> class Constness> class _ListIterator { typedef _ListIterator<U, Constness> _Iter; typedef typename Constness<U>::NodePtr _NodePtr; typedef typename Constness<U>::Type _Type; C2990 非类模板声明为类模板 解决: friend class List; template <class V> friend class _ListIterator; 14 if (m_ptr) m_ptr->incStrong(this); C2027 使用了未定义类型“android::RTSPMirroringSource::PlaybackSession::Track” FSV4 c:\users\lindt.scrc\desktop\all-compile-fsv5\all-compile-fsv4\fsv4\utils\strongpointer.h 124 C2227 左边必须指向类/结构/联合/泛型
VC里面需要定义完struct后才允许使用 Struck Track; |
转载于:https://blog.51cto.com/lindt/1789667