V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
251
V2EX  ›  问与答

vs 标准库 源码注释问题能不能想 Java 一样;

  •  
  •   251 · 2020-04-22 00:24:19 +08:00 · 704 次点击
    这是一个创建于 1476 天前的主题,其中的信息可能已经有所发展或是发生改变。
    4 条回复    2020-04-22 16:44:16 +08:00
    251
        1
    251  
    OP
       2020-04-22 00:26:03 +08:00
    vs c++ 里面注释很简陋,能不能下载注释丰富一点的头文件,像 java 这样:
    /**
    * Creates an unconnected Socket with a user-specified
    * SocketImpl.
    * <P>
    * @param impl an instance of a <B>SocketImpl</B>
    * the subclass wishes to use on the Socket.
    *
    * @exception SocketException if there is an error in the underlying protocol,
    * such as a TCP error.
    * @since JDK1.1
    */
    protected Socket(SocketImpl impl) throws SocketException {
    this.impl = impl;
    if (impl != null) {
    checkOldImpl();
    this.impl.setSocket(this);
    }
    }
    251
        2
    251  
    OP
       2020-04-22 00:28:36 +08:00
    vc 里面注释是这样的,太简陋了。
    #if INCL_WINSOCK_API_PROTOTYPES
    WINSOCK_API_LINKAGE
    _Must_inspect_result_
    SOCKET
    WSAAPI
    socket(
    _In_ int af,
    _In_ int type,
    _In_ int protocol
    );
    #endif /* INCL_WINSOCK_API_PROTOTYPES */
    lonewolfakela
        3
    lonewolfakela  
       2020-04-22 10:55:47 +08:00
    微软的东西主要靠文档而不是注释。可以直接去官网上看,也可以安装 VS 的 Help Viewer 组件然后下载离线文档……
    251
        4
    251  
    OP
       2020-04-22 16:44:16 +08:00
    @lonewolfakela 其实 java 注释就是文档,看源码直接点进一个方法,方法上面就是文档,看源码比较方便。不过 help viewer 也挺好用。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   985 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 20:13 · PVG 04:13 · LAX 13:13 · JFK 16:13
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.