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

build error #17

Open
qq316387171 opened this issue Mar 8, 2024 · 1 comment
Open

build error #17

qq316387171 opened this issue Mar 8, 2024 · 1 comment

Comments

@qq316387171
Copy link

#include <altstr.h>
#include
using namespace std;

After using string, compilation error is reported
error: use of undeclared identifier 'char16_t

@qq316387171
Copy link
Author

#include <windows.h>
#include <time.h>
#include
using namespace std;

int main() {
string str = "111222";
MessageBoxA(0,str.data(),0,0):
return 0;
}

cl /c main.cpp /EHsc /std:c++14

In file included from C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\include\cstddef:13:
C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\include\xtr1common(180,5) : error:
use of undeclared identifier 'char16_t'
180 | char16_t, char32_t, short, unsigned short, int, unsigned int, long, unsigned long, long long, unsigned long long>;
| ^
In file included from main.cpp:3:
In file included from C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\include\string:11:
In file included from C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\include\xstring:13:
C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\include\iosfwd(158,20) : error:
use of undeclared identifier 'char16_t'
158 | struct char_traits<char16_t>;
| ^
C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\include\iosfwd(160,20) : error:
use of undeclared identifier 'char32_t'
160 | struct char_traits<char32_t>;

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