2
Using the code below I type the two numbers, but if I give enter after typing the second number the answer appears quickly and the debug closes.
int main(){
int num1, num2, answer;
cout << "Digite um número:";
cin >> num1;
cout << "Digite um número:";
cin >> num2;
answer = num1 * num2;
cout << "Resultado:" << answer << endl;
cin.get();
return 0;
}
I put
cin.get();
but it didn’t work.
I’m trying to use Ctrl+F5 to debug, but clicking F5 locks my cursor and I have to click again to unlock, why?
On which line do I insert "breakpoint". I entered after Return, tested before and the window continues to close. The IDE is set to "default/default".
– I Wanna Know
And if I compiled the application, the breakpoint would still work for the user?
– I Wanna Know
I switched to VS6, but the shortcuts don’t work if I press F5 my cursor hangs.
– I Wanna Know
put the courses in the line "Answer = num1 * num2;", press F9 and then F5. The execution must stop there. The break only works in debugging. The version you will distribute should be compiled as a release.
– lsalamon