0

I'm trying to use Eclipse with C++, MinGW compiler, to debug some really simple programs, but i can't find a way to make it work, whenever i input a variable by keyboard, it changes it to a random 40-50 number.

It's probably because of my lack of knowledge but my classmates were having trouble aswell so i wanted to make sure we were doing it 'right'.

## Example ##

7
  • 2
    @John3136: It's an int, not a char. Commented Feb 19, 2017 at 21:47
  • 1
    Is it still random if you initialize i to 0? Is the breakpoint on line 39? What happens if you put it on line 40? Commented Feb 19, 2017 at 21:50
  • 1
    does cout print the correct int (3)? I'm guessing line 39 hasnt been run yet. Commented Feb 19, 2017 at 21:50
  • @Erix If i execute it normally, it works just fine, ut just gives troubles on debug mode Commented Feb 19, 2017 at 21:55
  • 3
    maybe similar to this stackoverflow.com/questions/14734078/… Commented Feb 19, 2017 at 22:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.