struct foo {
int bar;
};
...
struct foo *baz;
...
baz->bar = 10; /* segfault in the making */
hmmm...but that's not what i wrote....i think
Type: Posts; User: sql.scripter
struct foo {
int bar;
};
...
struct foo *baz;
...
baz->bar = 10; /* segfault in the making */
hmmm...but that's not what i wrote....i think
well, this assignment is an extension of a previous assignment. the first one was a basic singly list list and a binary tree. this assignment is a array with chained linked lists and a binary splay...
i'm not quite sure what you mean. could you reclarify it?
i insist using typedef because that is provided with the startup code for my uni assignment, so yea......
Ok, I've got some problems which i can't solve...
typedef struct abc* abcPtr;
typedef struct def
{
defPtr next;
char *fgh;
if i declare it outside, just as typedef struct abcPtr array[20], it works...why?
[my reply]: in my code, i did #define ARRAY_SIZE without specifying the number...lol...so all works now
btw, this is my error
ISO C90 does not support flexible array members
for this declaration: abcPtr array[20];
Well, I can't change my basic struct too much, we are allow to but if you change it too much, they won't work with the function paramenters, which we can't change in our assignment.
yea, with...
I can't seem to get it working.
typedef struct abc* abcPtr;
.....etc
typedef struct abc
{
defPtr head;
ok..thanks alot...will try my best :D
Thanks, but I still can't pictuer it :(
could you maybe expand slightly on it. thanks
I'm looking to make an array, and chaining duplicate hash values into a link list. I'm just unsure how to start with the structs, could anyone help? The problem is i don't noe where to put the...
^ you can't do that, the function is not a FILE pointer
don't worry ppl, i found out how to...
i need to read line by line using fgets and pass them into the function
This is my problem, I accidently deleted one of my files and now I forgot how to do one of the parts
FILE *name
name = fopen(argv[1], "r");
now i want to pass name into say function(char...
I'm up to my last part of my assignment for uni, i thought i had done it all correctly until i found out i hadn't (i've never played minesweeper before :D).. anywayz, i'm doing my function for...
lol..my bad, i was assiging it to the wrong array, lol..thanks alot for the help, really appreciate the quick replies! :D...
hmmm...well i only need to store only one of from 1-15...to row..so why do i need such a big array, actually cud u explain a bit about the double matrix....so it wudn't work with my way?
sorri, a typo! char* numbers[....]...hehe...anywayz how wud i fix it guys, thanks alot...
but digits from 10 onwards are two, so i have to use " "....
i'm pretty sure, i can do " "...
int main(void)
{
.
.
.
char row[15];
}
int function(char *row)
{
Ok, thanks alot, didn't think of that :D...
anywayz, I just realised what I'm doing wouldn't work. I tried it on pen+paper but yea, it only works with 4 digits..and I can't figure it out with...
Ok, I'm not sure exactly how to explain this but I'll try my best...
1. a function passes an unsigned in the form functionName(unsigned number)
2. I store it in an integer, i.e. int store =...
hmm....no i dun there is an error, cos he said he tested it on his dev c++ and it didn't work too.....but it worked when he had to compile it any uni, unix....... he said something about using...
Ok, this is my problem. My friend sent me his game (C Source) he had to make for uni: Poker. He compiled in Linux, don't know what he used. Anywayz I compiled it in windows using dev c++. The problem...
heheh...sorri, i've been lazy a bit..yea..juz tryin to practice a past assignments for my course before i start it in a month time...
thanks alot..there was a few more of these mistakes somewhere...
man, this is so annoying..lol..still exiting..but i juz found it doesn't if u input more than one character, i.e ab