Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Strange problem with code please look at it and tell me


ghost's Avatar
0 0

Ok Im trying to make one of the combination lock crackers but when I execute this code, it just flashs the cmd window. This occurs when I type in the number

code: #include <iostream> #include <stdio.h>

using namespace std;

int main() { cout << " MaterCrack Version 1.0.0" << endl; cout << " Written by Patient0" << endl; int third; cout << "enter the third number: "; cin >> third; int offset = third % 4; cout << "possible first numbers: "; for (int i = 0; i < 10; i++) cout << offset + 4i << " "; int offset2 = offset; if (offset < 3) offset2 += 2; else offset2 -= 2; cout << endl << "possible second numbers: "; for (int i = 0; i < 10; i++) cout << offset + 4i + offset2 << " "; cout << endl; }


ghost's Avatar
0 0

try markupSystem(&quot;pause&quot;);

at the end. Depending on what compiler you use you may need to include something else. E.G for the compiler I use markup#include&lt;string&gt;

:P Btw: There is no logical reason I can think of why it is "string" that must be included for system commands in my compler :P


ghost's Avatar
0 0

Now it says "implicit declaration" in the line with the systems command..


Uber0n's Avatar
Member
0 0

It should be like this (without smileys)

system("pause");


SySTeM's Avatar
-=[TheOutlaw]=-
20 0

try including windows.h and then putting system("pause"); at the end.


ghost's Avatar
0 0

getch()