Unless a function is "pure virtual," which your Student's Print function isn't, you need to define it. You should either come up with a simple definition, or just put
{} after the declaration like...
Type: Posts; User: CrazedBrit
Unless a function is "pure virtual," which your Student's Print function isn't, you need to define it. You should either come up with a simple definition, or just put
{} after the declaration like...
Haha that makes two :p
Glad I could help
Shouldn't this
cpu_line = backup;
be
backup = cpu_line;
Because backup never gets initiated. And i'm guessing that the while(cpu_line==backup) loop is supposed to keep looping until you...
C will automatically round down, or simply cut off the decimal, if you assign a floating point value to an integer variable. If you wish to round up all the time, simply do that and then add one to...
I don't know if this make any difference, but tan(pi/2) is not actually inifinity. By definition tan is sin/cos and since the sin of pi/2 is 1 and the cos of pi/2 is 0 the tan of pi/2 is an...
If all you need to do is print the array there is no need to actually modify any of the values in the array. Just use a for loop to cycle through each value in the array, and if it is not equal to...
There are two problems I can see. The first is in your call to scanf. In this you need to include an & in front of the get, because you actually need to send the memory address of the variable not...
Your problem is in your while statement. The first issue is that each time you declare getchar() you are getting a different character. What you need to do is make a new character varable, lets say...
so...ummm....there was absolultly no problem with the for loop...it just had to be done differently in order to change the number each time.
printf ("\nEnter the number of gallons used for tank...
Nono, bithub is right, I was wrong. When you declare an array...ex. array[7] you get 7 chunks of memory. But that memory starts at 0, so its really 0-6. So you need to change that line to the one...
Here's an issue:
for (y = 1; y > 7; y++)
Should be <= I believe
I don't think I fully understand your question....but if you just look at the loops logically they'll be pretty easy to figure out. For example the one you showed m would equal 31+31+31 for its...
Just like you don't need a ; after your if statements you don't need a semicolon after your while statement. If you do put one it will simply repeat over and over again until Counter is less than...
Don't forget to box in your main.
int
main(void)
{
int score [100];
score [0] = 5;
score [1] = 3;
Oop my bad. You're right Sly it would be best to use a while loop for that, but, it would still be possible to do it using an infinite loop with a break statement.
-Crazed
Hmm...try declaring the FILE at the beginning of main, where you normaly declare variables. The compiler might like it better there. Otherwise...I'm not really sure what the issue is.
Also, you...
Yeah, ditto what cwr and sly said. Don't bother reading his post. But do try using a for loop, then show us what you come up with and we'll be happy to help you work through the problem.
-Crazed
Also you will never have a total of one because the lowest roll for each die is a one, and one plus one is two.
Well....from what I can see you've got a couple problems,
int main () {
STUDENT stuArr[MAX_STUDENTS]; STUDENT, MAX_STUDENT, are these in test.h? what are they?
void rmNl ( char s[]...
total = total - (MINS_HR * SECS_MIN);
shouldn't this be:
total = total - (MINS_HR * SECS_MIN * h);
The only way for you to really do this nicely would be to change the number of lines you use for the roof depending on the width entered.
This is what I came up with, feel free to do it however you...
looks to me like the problem is probably in your equalBets function. Try posting that.
You've also got some issues with your brackets. You need to include all of your main () stuff in brackets. ex
int main()
{
blah blah blah
return(0);
}
Not to mention, that...
Oh okay, I'm at my home computer now so I could compile it and see what you meant. I understand the problem now.
Try this:
do
{
time = time + 1;
...
Umm...I only see a couple lines with odd indenting, and even then its still pretty readable...As for the altitude problem, is there any guarentee that it will ever equal exacly zero? What if it goes...