On another note, trying to put numbers with decimals into int variables is alot of fun.
Maybe I should actually learn how to program before I start smashing my head on the keyboard and hope I end...
Type: Posts; User: Flakster
On another note, trying to put numbers with decimals into int variables is alot of fun.
Maybe I should actually learn how to program before I start smashing my head on the keyboard and hope I end...
Wow.
Hurrah for wasting two days of debugging over a stupid mistake.
And, thank you.
I'm having trouble compiling what I am working on in Visual C++ 2005 express edition. I also tried compiling the same code in Dev-C++ and still had problems. The code itself probably still has some...
=D Too slow! Thanks anyways =)
for (studentNumber = 0; studentNumber < numStudents; ++studentNumber)
{
if( lowRange < grades[studentNumber] && grades[studentNumber] < highRange ) ++gradesInRange;
}
Using this still only...
Or atleast thats what I THINK the problem is. Here is the function I am having toubles with.
The idea is that two numbers are entered, and the code should check to see how many numbers in the...
Thirded?
Email is [email protected].
I can't bring discs to school or I'll get totally ..........ed out.
"That disc has a virus in it, doesn't it!"
I have a small favor to ask of someone, I need an Icon file made.
I have the picture here for the icon, but I can't install an icon maker on my computer at school. I really want this icon to make...
I'm using Dev C++ 4.9.9.2 with the built in MingW compiler.
I'm going to try right now and see if sleep would help at all...
Sleep still allows the stacked key hits to go after sleep is done,...
You got it, except that I don't want to know if they are missing the instructions, I want to avoid that altogether.
I only want them to move on after seeing the "Please hit enter to continue"...
There is no user input, thats the thing. It's just a simple prompt.
cout<<"When ready, please press enter"<<endl;
cin.get();
The cin.ignore solution (cin.ignore(numeric_limits<streamsize>::max(), '\n')) only ignores the first enter hit, then the next runs through. My problem is that I have some impatient people that...
Your problem is that the operator >= is looking to see if 'gender' is greater then or equal to 'M'. The operator you want to use it == which checks to see if 'gender' is identical to 'M'.
I'm wondering, what part of that FAQ is the actual script that is flushing the input buffer? It's a little confusing, can someone help me make sense of it?
Is there anyway to prevent from keystroke stacking in a program?
I'm consistently have a problem with cin.get() where the user presses enter either accidently or for some other reason before...
You can also use 'system("color xx");', which I believe is also covered in the windows.h header file.
Replace the first x with your desired background color, and the second x with your desired...
Yeah, that was kind of pseudo/very crappy code I threw together, then I realized I was pretty much doing it right already, but I was thrown off by a simple mistake elsewhere in my code.
Thanks...
Oops, nevermind, I figured out what I was doing wrong.
I was using return properly, but I wasn't in the right spot.
Sorry for horribly vague questions.
Ok, I was asking the wrong question, sorry.
If I want to return a variable, does it need to be stated with the function?
As in, should it look like this?
#include <iostream>
So if I go...
return num;
it will take the variable that num and return it to where it was declared?
I have my variables stated globally, and at the end of each function, I want them to be updated globally, so that the next function is using the right numbers.
Does return do this? How do I go...
I'm using Dev C++ 4.9.9.2
OS: Windows XP
I was wondering if it would be possible to create a pause that will only continue after a keystroke.
Sort of like our little friend system("pause"), except, I don't want the text "Press any key to...
This has helped alot guys, thanks.