Error flies
Run-Time Check Failure # 2 - Stack around the variable 'symbol' was corrupted.
In the code:
int main() { //system("chcp 1251"); setlocale(0, "Russian"); char symbol; cout << "Введите символ: "; cin >> symbol; OemToAnsi(&symbol, &symbol); cout << symbol; cout << endl; return 0; } The error appears only when I call the OemToAnsi (& symbol, & symbol); . In the process of tracing, I found out that the error crashes on the last command return 0; in main () .
How to fix it?
CheckNameOfFile, then surely the problem will not disappear, and the code will become easier. - VladDOemToAnsi? What is her signature? Where is it defined? I can not find it in MSDN. - VladD