C++ 这种语法没见过 叫什么 ?

2021-01-21 18:16:36 +08:00
 hardyfish

在链式编程看到的,自己放到 vc2017,编译不过去。 https://github.com/uNetworking/uWebSockets

uWS::SSLApp({ .key_file_name = "../misc/key.pem", .cert_file_name = "../misc/cert.pem", .passphrase = "1234" })

提示语法错误 Error C2059 syntax error: '{' ConsoleApplication2 i:\temp\consoleapplication2\consoleapplication2\consoleapplication2.cpp 17

2959 次点击
所在节点    C++
8 条回复
linux40
2021-01-21 18:19:17 +08:00
shylockhg
2021-01-21 18:20:26 +08:00
hardyfish
2021-01-21 18:31:16 +08:00
@linux40 谢谢,看来只能升级 vc2019 了
codehz
2021-01-21 18:31:42 +08:00
msvc 2019 是支持的
yujincheng08
2021-01-21 18:41:47 +08:00
Designated initializers
hackpro
2021-01-21 19:01:47 +08:00
出现在结构体中吧
stevefan1999
2021-01-21 21:49:48 +08:00
gnu89/c99 的 designated initializer...
buzailianxi
2021-01-22 10:40:13 +08:00
c 结构体早就可以这么搞

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

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

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

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

© 2021 V2EX