251
V2EX  ›  问与答

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

  •  
  •   251 · Apr 22, 2020 · 1203 views
    This topic created in 2274 days ago, the information mentioned may be changed or developed.
    4 replies    2020-04-22 16:44:16 +08:00
    251
        1
    251  
    OP
       Apr 22, 2020
    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
       Apr 22, 2020
    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  
       Apr 22, 2020
    微软的东西主要靠文档而不是注释。可以直接去官网上看,也可以安装 VS 的 Help Viewer 组件然后下载离线文档……
    251
        4
    251  
    OP
       Apr 22, 2020
    @lonewolfakela 其实 java 注释就是文档,看源码直接点进一个方法,方法上面就是文档,看源码比较方便。不过 help viewer 也挺好用。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5464 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 443ms · UTC 09:15 · PVG 17:15 · LAX 02:15 · JFK 05:15
    ♥ Do have faith in what you're doing.