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

2020-04-22 00:24:19 +08:00
 251
721 次点击
所在节点    问与答
4 条回复
251
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
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
2020-04-22 10:55:47 +08:00
微软的东西主要靠文档而不是注释。可以直接去官网上看,也可以安装 VS 的 Help Viewer 组件然后下载离线文档……
251
2020-04-22 16:44:16 +08:00
@lonewolfakela 其实 java 注释就是文档,看源码直接点进一个方法,方法上面就是文档,看源码比较方便。不过 help viewer 也挺好用。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/664825

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX