Compiler Error C2017
illegal escape sequence
An escape sequence, such as \t, appears outside of a character or string constant.
The following sample generates C2017:
// C2017.cpp
int main() {
char test1='a'\n; // C2017
char test2='a\n'; // ok
}
C2017 can occur when the stringize operator is used with strings that include escape sequences.
The following sample generates C2017:
// C2017b.cpp
#define TestDfn(x) AfxMessageBox(#x)
TestDfn(CString("\\") + CString(".h\"\n\n")); // C2017
Pripomienky
https://aka.ms/ContentUserFeedback.
Pripravujeme: V priebehu roka 2024 postupne zrušíme službu Problémy v službe GitHub ako mechanizmus pripomienok týkajúcich sa obsahu a nahradíme ju novým systémom pripomienok. Ďalšie informácie nájdete na stránke:Odoslať a zobraziť pripomienky pre