为什么我的c++ VS代码中的评论关闭?
我不明白为什么我的块评论不会使用 /* */
/*
Name: Net ID:
Course: Assignment: Part 1
Programming Environment: WSl VS Code
C++ compiler- g++
C++ debugger- gdb
Purpose of File: Generate lexical analyzer using flex
*/
如果在同一行中使用,它会识别 /* */,但仅此而已。我刚刚下载了 VS code,尽管我对 c++ 有点熟悉,但这让我感到困惑......我为新手问题道歉。预先感谢您对我遇到的这个问题的任何指导。
I'm not understanding why my block comment won't close using /* */
/*
Name: Net ID:
Course: Assignment: Part 1
Programming Environment: WSl VS Code
C++ compiler- g++
C++ debugger- gdb
Purpose of File: Generate lexical analyzer using flex
*/
It's recognizing /* */ if used in the same line, but nothing more. I just downloaded VS code, though I am somewhat familiar with c++ and this has me stumped..I apologize for the noobie question. Thank you in advance for any guidance on this issue I'm having.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将注释放入 (f)lex 扫描仪定义中,但它们不得触及左边距。注释的每一行必须缩进至少一个空格或制表符。
我不知道 VS code 是否真的理解 (f)lex 语法,但您必须缩进注释才能使用 flex 处理文件。
You can put comments into a (f)lex scanner definition, but they must not touch the left margin. Every line of the comment must be indented by at least one space or tab.
I don't know if VS code really understands (f)lex syntax, but you'll have to indent your comments in order to process the file with flex.