- FAQ (Frequently Asked Questions)
- error: use of undeclared identifier 'nullptr'
error: use of undeclared identifier 'nullptr'
$ g++ -o main *.cpp
- HW08.cpp:5:19: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
- BSTNode *root = nullptr;
- ^
- HW08.cpp:5:21: error: use of undeclared identifier 'nullptr'
- BSTNode *root = nullptr;
- ^
The error and warning messages you're seeing indicate that the use of nullptr is not supported by the compiler you're using. You can fix this by adding the -std=c++11 flag to your compilation command:
g++ -std=c++11 -o output_file_name input_file_name.cpp
Need assistance? Check out my discussion board or review the GitHub status page.
© 2023 AppleBoiy • Code of Conduct • [MIT License](LICENSE)
Back to Top