Detect whether path is absolute or relative

前端 未结 3 1424
太阳男子
太阳男子 2021-02-19 01:06

Using C++, I need to detect whether given path (file name) is absolute or relative. I can use Windows API, but don\'t want to use third-party libraries like Boost, since I need

3条回答
  •  遥遥无期
    2021-02-19 01:51

    The Windows API has PathIsRelative. It is defined as:

    BOOL PathIsRelative(
      _In_  LPCTSTR lpszPath
    );
    

提交回复
热议问题