251
V2EX  ›  问与答

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

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