- Strength to Increase Rep
- +3
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Hi! I opened this thread because I've found out that, as I'm making my way through a textbook, I find many problems which I can't figure out for myself. To start, **Thinking in C++** has this buggy program right in its second chapter. The code looks OK to me, but … | |
<< split from [url]http://www.daniweb.com/forums/thread67837.html[/url] >> I need to print post #15. How do I do that? I can't seem to find the button. I need it just as it was written here. Also, do I need to know C++ classes in order to be able to implement the in-game classes? … | |
Re: Try using Code::Blocks as your IDE, because I'm sure this uses MinGW, which is the Windows port of the GNU C++ Compiler, which is probably the best C++ compiler. Or... you could try installing Ubuntu and run the original compiler. This way, I'm positive you'll get all the errors that … | |
Re: I think you should have used [icode]vector<TYPE> my_vec[/icode]. | |
Re: You might also want to prompt the user for the file's path. This way, you'll have a second variable, or you'll have to also tell the user to include the path when he inputs the file name. If you go for the former, you'll also need some string concatentation. | |
Re: [QUOTE=ALI INAM;924372][code] #include "stdafx.h" #include <iostream> #include <fstream> #include <string> ... }while (i < 5); } [/code] i hope this helps you more then it helps me and all of you are mo9st welcome to improve it and best of all critise on ot[/QUOTE] Have you tried compiling the code … | |
Re: [quote][icode]choice > 0 && choice < 5[/icode] (I also changed the one to a zero here).[/quote] Hmm... if the range is 1 - 5 (5 included), shouldn't we use [icode]choice > 0 && choice <6[/icode] or [icode]choice > 0 && choice <= 5[/icode]? |