I think this may be what you're trying to do. This is quick and dirty, it doesn't check for number or type of arguments. After compiling, you pass the arguments into the program like this when you...
Type: Posts; User: javaeyes
I think this may be what you're trying to do. This is quick and dirty, it doesn't check for number or type of arguments. After compiling, you pass the arguments into the program like this when you...
Oh that is gold, never would have figured it out. Never heard of fabs, but it works perfectly now. Thanks for wading through this disaster of code.
Well if anyone is willing to look through it, it compiles with no warnings with -Wall, and is very close in its prediction. First the program reads in the actual NFL scores from week 1, it then...
I understand that 1.2 cannot be represented perfectly with a float. But I am getting an off by 1 (or really off by .99998) error and I am convinced it not due to array indexes but by floating point...
This will work nicely, thank you.
Yeah, it would make a real mess of main if I initialized game[] there. There is going to be a lot of messy initialization going on. One last question, currently in init_games() I'm using two lines...
Perfect! Thanks STD and everyone else, it works.
This is my compiler output, when I try init_games(game)
c:26:3: warning: passing argument 1 of âinit_gamesâ from incompatible pointer type
nfl1.c:6:6: note: expected âstruct game_t *â but...
Ok, I can create the array of structs, and I can start initializing the array within main, but really I want to do the initialization within a function init_games(). So I want to pass the array of...
Thanks Adak for the verbose reply. This would definitely work. I'm going to go over it a bit more and factor in some more of my own requirements and decide which approach to take.
Hmmm, this seems like the right approach. I debated whether to have a field that explicitly states the home team, or to do it by convention with the home team always the 'firstteam.' I feel like...
I want to create a data structure to record the results of football games for an entire season (or more.) I only want to record the final score, not quarters, or any stats on any players. I think I...
Sweet Juniper berries. This is absolutely the last help you'll get without showing some effort (read: code) of your own. Look at this code for a similar function isEven(). Play around with it,...
I can't just give you the answer, but I'll give you a hint. Nested loops are one loop inside of another. Compile and run this code and take a look at the output. Then modify it some and post your...
Thanks
I am trying to factor large semi-prime numbers (prime multiplied by a prime.) You can probably do the math, and I realize that this may all be in vain, but it's a lot of fun and I'm learning a ton...
I will need go beyond 64 bit unsigned integers, so I will need to use some sort of additional library at the least. I am beginning to think python might be an easier road, i've read that the int...
I have been writing some c code to investigate the properties of prime numbers. Currently I have a function getPrimes(int primemax) which dynamically allocates memory for an array of the primes, so...
I agree with oogabooga, using arrays will simplify this greatly. I once wrote a hand analyzer in php, and it turned out to be easier than I originally thought. I haven't looked through the code too...
I don't really think it can be done, although the mission impossible image is hilarious. To answer laserlight's question, you don't know anything about the user except that they have an internet...
I am trying to conceive an algorithm / concept for a website / web service where each user can have only one account. I suppose Biometrics would be one starting point, but I don't want to use that....
That helps a lot, seeing it from a viewpoint of precedence makes it clearer.
Oh, where are my manners, thank you very much Laserlight
That did it. Although I'm just not sure why. What does *count++ do? Why doesn't it increase the value of what count points to?
If you're busy don't worry about it, it works, now I just have to...
I am trying to return a pointer to a dynamically created array of ints from a function. Right now the array values should be the same as their index. so data[3] = 3.... Eventually this array will be...