Deadlines void the Tomorrow bit.
Type: Posts; User: Graham Aker
Deadlines void the Tomorrow bit.
Aright, I've done a little more work on the program, and it's running, but Option, numbr1, and numbr2 are spitting junk back at me. Can anyone help me fix this?
#include <stdlib.h>
#include...
Currently listening to: Hello Goodbye by MELL
Interesting how many Beetles references she throws into that song... Oh, and it's not a cover.
Really? One of the other forums I go to has a topic just like this pinned in the General Discussion.
Then again, Cboard is a more professional board, so a frivolous topic like this could be marked...
That's because it's the exact same assignment. >_o
I'll definitely need to take a look at that...
EDIT: Lucky guy, he is. He didn't have to do the extra options...
Oh, right, sorry. I made a post earlier talking about the fact that I screwed up the original input file. Here's the real correct test input file:
3
1 8888888888 2222222222
2 9999999999...
What makes this odd is the program doesn't crash at all on my end. It won't read the option right, but it technically compiles and runs fine, which makes me think there's a logic error somewhere in...
My compiler does indeed enable warnings. However, even with them enabled, I never got ANY of those warnings from Dev-C++.
And what do you mean you doubt I get past my fscanf() line?
EDIT: Is...
Here's the code of the running program:
#include <stdlib.h>
#include <stdio.h>
#define big 200
struct integer {
int* digits;
Yeah, it was that one. I flopped the > to a < and it compiled perfectly. Thanks for that!
Now the problem is the addition, subtraction, and comparison functions that come next...
I slapped a printf in there to check the value and I got a screenful of junk. So, how exactly would I free up that memory that's causing all of this?
EDIT: Wait, nevermind, it was indeed that...
How would I check the return value of malloc?
Also, if it can help uncover where the Access Violation is, I'll post the full code again (Minus the extra functions)
#include <stdlib.h>...
After a great deal of help from some of my friends, I think I fixed most of the problem in that function. However, somehow, I've gotten myself another Access Violation. Here's the new code:
...
Oh. Well, yeah, I guess I should have been more specific...
How do I make sure the value I want is returned in that function?
Isn't the problem I'm dealing with now a bit different?
This is MELL.
As for why I post "Every song", I wasn't. I actually was cycling through several of her songs, and was just posting what I was litening to at the moment. Although I can see how that...
...Okay... So how do I fix it?
Seriously? That's it?
...Please excuse me while I bang my head against this desk here.
...No, wait, hold that thought, it's crashing when I try it. Though I'm sure I'm doing it horribly wrong......
Currently listening to: Egen by MELL
I wish I could, honestly, but it's due tomorrow at midnight and I've got a three-part Java project due wednesday at midnight as well.
Here's hoping the Java project's easier than this. o_o;;
Okay, so does anyone have any idea how I can take a string and turn it into an integer array with a function that's header is "struct integer* read_integer(char* stringInt);"?
Oh, durr. Now I feel like a complete idiot. >_<;;
...Uh, what? That's a bit vague...
Oh, and joy, I just found what his input file was. Posting that now...
3
1 8888888888 2222222222
2 9999999999 10000000000
2 10000000000 9999999999
Aright, I removed the *, and I got an error on line 39 about an incompatable type in argument 3 of 'readnum'. How would I fix this?
Oh, yeah, the code:
#include <stdlib.h>
#include <stdio.h>
...
Oh, that one. Yeah, I can take the * out there. >.>;;