C++ manually Convert string to int?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I was trying to manually convert a string to an int, and I have had difficulties. I first check to see if the string entered is an integer. Next, I want to convert that string to an integer without using any library methods. When I ran the code inside my loop line by line, it did what I needed it to, but when I ran it inside a loop, it spat out incorrect binary results. ==> I am going to check if the value you enter is a number. ==> Enter a number: 234 ==> Input result: 1 ==> Press enter to continue... ==> 11001 // Darian Nwankwo, Random