Hello again. I am writing what I hope to be my last C++ program! I an just runni
ID: 3548114 • Letter: H
Question
Hello again. I am writing what I hope to be my last C++ program! I an just running into a few problems. Right now may program takes a string input convert it to an interger and return the value. I have posted a simplified version of the code here:
http://pastebin.com/87guaHzk
The problem that I am having is twofold. First, with the code all on the main.cpp file the bandN value is always 2. Second, when the program is split up into three files (Res.h, Res.cpp, and main.cpp) I get garbage for a result. As always, any help would be greatly appreciated especially if there is an explination as well. Thanks!
Explanation / Answer
Your correct program is here: http://pastebin.com/chwrTwQa
You forgot to assign bandN variable.
The error was on line 88 in main():
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.