c++ - VC++ 中的 getopt()

标签 c++ windows visual-studio-2008

我非常喜欢使用 GNU getopt , 在 Linux 下编程时。我知道 getopt() 在 MS VC++ 下不可用。

注意:

  • Win32 环境
  • 使用 Visual Studio
  • 没有Boost
  • 没有 MFC
  • 不关心便携性

问题:

  • 我怎样才能相应地移植 getopt()?
    • 移植时我应该注意哪些准则?
  • 具有相同特征的已知端口?

最佳答案

这可能有帮助,它也很容易集成

http://www.codeproject.com/KB/cpp/xgetopt.aspx

关于c++ - VC++ 中的 getopt(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/543570/

相关文章:

windows - 文件扩展名 .kt ?这是什么文件?

c++ - 使用 C++-98 的 Meyers Singleton 线程安全

c++ - Visual Studio : can't add ATL class to ATL project?

c++ - 检查时间是否在 C++ 中的特定时间间隔内?

C++ MPI_Bcast 类

c++ - 在可变 lambda 中通过常量引用捕获

c++ - Windows API MONITORINFO 结构

windows - 适用于 JavaScript 版本 2.1.30324.52 的适用于 Windows 库的 Visual Studio 扩展似乎停留在 "Configuring your system. This might take a while."

在 Win8/Ubuntu 上编译 Makefile 行为不同?

c# - 在 C# 中使用 LINQ 查询 MS access 数据库