728x90 [-Wwrite-strings]1 warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] 우분투에서 C++ 코딩 후 컴파일 하면서 나온 경고이다. 간단하게 사용하려고 했던 코드의 Before & After는 다음과 같다. Before char* tdate; char* idate; tdate = "20220721"; idate = "20220310";// C: OK, C++: NOT OK After char* tdate = (char*)"20220721"; char* idate = (char*)"20220310"; C++ 2022. 7. 22. 이전 1 다음 💲 추천 글 반응형 SMALL