Win32 data types equivalant in Linux

前端 未结 4 1469
故里飘歌
故里飘歌 2021-02-09 17:41

I am trying to convert a C++ library which is using widely DWORD, CString and BYTE in the program, and now I am converting the code from C++ Win32 library to linux program . Als

4条回答
  •  攒了一身酷
    2021-02-09 18:03

    • DWORD = uint32_t
    • BYTE = uint8_t

    These types are not OS specifics and were added to C++11. You need to include to get them. If you have an old compiler you could use boost/cstdint, which is header only.

    Use std::string instead CString, but you will need to change some code.

    With these changes your code should compile on both Windows and Linux.

提交回复
热议问题