Write your question here.
I just hit a wall on this again, I really need specific instructions on how to make this work please. I am trying to get it to allow the user to enter the min and max number for the random number to guess and also the number of tries from 1-20. I just started doing c++ after VB, Thanks.
This is the code I have now. And this is due by the end of the day tomorrow so if you can or anyone can it would be awesome if someone can help me. I cant miss this deadline. And just btw, I am trying to do it on my own but i just keep running into problems that i dotn understand. Thanks
1. If you want to insert a comment in code do it like so: std::cout << "Hello World!"; // some comment
, your first line in code is interpreted by compiler as an actual code
2. Is there really a need for functions like this one?
1 2 3 4 5
int lowerBound(int minBound, int min);{
cout << "Enter a min number: " << min << endl;
cin >> min;
return min;
}
Without function it'd use 2 lines of your code
3. Maybe try to use some programming style. You make serious mistakes, e.g. you write code outside a function 'cuz you didn't realize you've already closed the function(playAgain(), guess_number()). The most important thing with this is to be adamant. If you use it, use it with no exceptions. Here you can read about it: http://www.cprogramming.com/tutorial/style.html
4. I think you use Visual Studio. Next time you make a project click on next button -> check empty project check box. You don't know some basics, so you probably don't know anything about separate compilation too. I wite it 'cuz you include stdafx.h header file in your code
5. You don't know anything about scope of variables, you use variables declared as local variables in other functions(they exist only in this function) in the whole file.