Hi there, I am new to coding and have run into a problem where I see the above error message and my programme is unable to run.
The code where I recieve this error is my attempt at http://projecteuler.net/problem=4
I am unsure what I am doing wrong, so if you could possibly have a look through my code and see if there are any errors I have made and suggest a working method of getting around these problems, it would be greatly appreciated.
Is there a way I could retrieve a certain number from an integer, e.g. the second number of my integer 'productResult'?
You can use stringstreams to convert the integer to a string and then grab the second "digit" from productResult and then convert it to a integer again if you need to do more calculation on it.
Or better yet just use simple mathmatics to grab a second digit from your number.
Also I would highly suggest you get away from declaring all your variables globally since that will cause you major problems in the future and is considered a very bad practice. You also should learn about function parameters and passing your variables into your functions as arguments instead of having them globally declared.