Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译报错,不支持c++11 #32

Open
talentCODE opened this issue Aug 30, 2023 · 0 comments
Open

编译报错,不支持c++11 #32

talentCODE opened this issue Aug 30, 2023 · 0 comments

Comments

@talentCODE
Copy link

🐛 Bug Report

In file included from /home/ws/.config/Code/User/globalStorage/wangtao0101.debug-leetcode/cppproblem1.cpp:11:0:
/home/ws/.config/Code/User/globalStorage/wangtao0101.debug-leetcode/commoncppproblem1.h: In constructor ‘ListNode::ListNode()’:
/home/ws/.config/Code/User/globalStorage/wangtao0101.debug-leetcode/commoncppproblem1.h:13:31: error: ‘nullptr’ was not declared in this scope
ListNode() : val(0), next(nullptr) {}

/home/ws/.config/Code/User/globalStorage/wangtao0101.debug-leetcode/commoncppproblem1.h:33:32: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
vector list{};
^
/home/ws/.config/Code/User/globalStorage/wangtao0101.debug-leetcode/commoncppproblem1.h:33:31: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
vector list{};

这是我粘贴的一些报错信息, 应该编译选项不支持c++11, 但是不知道如何解决

Your Environment

image

  • os: Linux ws-System-Product-Name 4.15.0-142-generic #146~16.04.1-Ubuntu SMP Tue Apr 13 09:27:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
  • extension settings: Cpp Comolier: gdb gdb absolute path: /usr/bin/gdb
  • nodejs version: v14.21.2
  • vscode version: 1.81.1
  • extension version:v0.2.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant