Mail.ruПочтаМой МирОдноклассникиВКонтактеИгрыЗнакомстваНовостиКалендарьОблакоЗаметкиВсе проекты

С++ почему не работает код

Толик Омороков Ученик (171), на голосовании 3 месяца назад
#include <iostream>
#include <list>
#include <windows.h>


using namespace std;

void wait(int miliseconds)
{
clock_t endwait;
endwait = clock() + miliseconds * CLOCKS_PER_SEC;
while (clock() < endwait) {}
}

int main() {
setlocale(LC_ALL, "Russian");
list <int> num;
list <int> this_list = { 3, 4, 5, 6 };
int cheat;
int procenti{};
cout << "^^ hi, loader is development, if you have problems, then visit the expandera.win website and go to the contacts section" << endl << "select cheat : " << endl << " [3] - Plague " << endl << " [4] - Primordial " << endl << " [5] - Aimware" << endl << " [6] - Fatality[EA]" << endl << "write cheat id : ";
cin >> cheat;
wait(1);

if (cheat == 3 or 4 or 5 or 6) {

system("cls");
wait(1);
cout << endl << "preparing info for loggining in" << endl << endl;
wait(2);
cout << "getting info about binary..." << endl << endl;
wait(2);
cout << "waiting game...." << endl;
cout << "preparing image...." << endl;
cout << "got info about binary..." << endl;
cout << "getting allocation for binary..." << endl;
cout << "allocated for binary..." << endl;
wait(1);


CONSOLE_CURSOR_INFO cci{ 1, false };
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cci);
cout << endl << "loaded ";
auto percent = 0;
while (true) {
cout << percent << '%';
if (percent == 100) break;
Sleep(100);
cout << "\b\b";
if (percent > 9) cout.put('\b');
++percent;
}
cci.bVisible = true;
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cci);
cout.put('\n');





cout << endl << "collected info ";
while (true) {
cout << percent << '%';
if (percent == 100) break;
Sleep(300);
cout << "\b\b";
if (percent > 9) cout.put('\b');
++percent;
}
cci.bVisible = true;
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cci);
cout.put('\n');

}

else {
setlocale(LC_ALL, "Russian");
MessageBox(NULL, L"error", L"Select right cheat id", MB_OK);

}

return 0;
Голосование за лучший ответ
RatÆCat Оракул (57857) 4 месяца назад
Компилятор в помощь
Толик ОмороковУченик (171) 4 месяца назад
прикол в том, что в 25 строке ошибка ИНОГДА появляеться, из за этого не работает проверка ( if ). Проблема именно в этом, но я не смог вписать в текст потому что не хватило символов
ewfwe wefwef Профи (538) 4 месяца назад
#include <iostream>
#include <list>
#include <chrono>
#include <thread>
#include <windows.h>

using namespace std;

void wait(int milliseconds)
{
this_thread::sleep_for(chrono::milliseconds(milliseconds));
}

int main() {
setlocale(LC_ALL, "Russian");
list <int> num;
list <int> this_list = { 3, 4, 5, 6 };
int cheat;

cout << "^^ hi, loader is development, if you have problems, then visit the expandera.win website and go to the contacts section" << endl
<< "select cheat : " << endl
<< " [3] - Plague " << endl
<< " [4] - Primordial " << endl
<< " [5] - Aimware" << endl
<< " [6] - Fatality[EA]" << endl
<< "write cheat id : ";
cin >> cheat;
wait(1000);

if (cheat == 3 || cheat == 4 || cheat == 5 || cheat == 6) {
system("cls");
wait(1000);
cout << endl << "preparing info for logging in" << endl << endl;
wait(2000);
cout << "getting info about binary..." << endl << endl;
wait(2000);
cout << "waiting game...." << endl;
cout << "preparing image...." << endl;
cout << "got info about binary..." << endl;
cout << "getting allocation for binary..." << endl;
cout << "allocated for binary..." << endl;
wait(1000);

CONSOLE_CURSOR_INFO cci{ 1, false };
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cci);
cout << endl << "loaded ";
int percent = 0;
while (percent <= 100) {
cout << percent << '%';
if (percent == 100) break;
this_thread::sleep_for(chrono::milliseconds(100));
cout << "\b\b";
if (percent > 9) cout.put('\b');
++percent;
}
cci.bVisible = true;
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cci);
cout.put('\n');

cout << endl << "collected info ";
percent = 0;
while (percent <= 100) {
cout << percent << '%';
if (percent == 100) break;
this_thread::sleep_for(chrono::milliseconds(300));
cout << "\b\b";
if (percent > 9) cout.put('\b');
++percent;
}
cci.bVisible = true;
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cci);
cout.put('\n');
}
else {
MessageBoxW(NULL, L"error", L"Select right cheat id", MB_OK);
}

return 0;
}
Толик ОмороковУченик (171) 4 месяца назад
лучший, спасибо
Похожие вопросы