Explain the function of static keyword and final keyword in Java in detail>>>
In the previous article, in C/C + +, multiple DOS commands were executed at one time. The source code under MSDN was compiled directly in dev CPP. The following warning information was reported:
D:\Workspace\research\C\main.cpp [Warning] deprecated conversion from string constant to ‘LPTSTR {aka char*}’ [-Wwrite-strings]
I checked online and said that this is the latest C/C + + standard and does not support the following writing method:
char* x = "hello";
Solution: change char * to const char *
const char* x = "hello";
Similar Posts:
- How to Solve Const variable assignment Error
- [Solved] Warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
- Solution to the problem of “TypeError: Assignment to constant variable”
- [swscaler @ …] deprecated pixel format used, make sure you did set range correctly
- [Solved] undefined reference to `cv::imread(std::string const&, int)’
- C++ Project Error: C Undefined symbols for architecture x86_64: “char_width(char)”
- C++ error: cannot bind non-const lvalue reference of type ‘myString&’ to an rvalue of type ‘m…
- [Solved] Undefined reference_G++ _GLIBCXX_USE_CXX11_ ABI compilation error: STD:: Basic_String and STD::__cxx11::basic_String cannot match
- How to Solve Error: buuctf re [MRCTF2020]Xor
- [Solved] Clang: error: linker command failed with exit code 1