为什么我的c++ VS代码中的评论关闭?

发布于 2025-01-12 01:49:35 字数 595 浏览 2 评论 0原文

我不明白为什么我的块评论不会使用 /* */

/* 
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

 */

Snapshot

如果在同一行中使用,它会识别 /* */,但仅此而已。我刚刚下载了 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

 */

Snapshot

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眉黛浅 2025-01-19 01:49:35

您可以将注释放入 (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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文