Skip to content

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

Description

@talentCODE

🐛 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions