I changed it so it's consistent, but I didn't write the _ORDER_H part so I'm not gonna change it.
Anyway, the exact error is:
OrderList_stubs.c: In function `OLinit':
OrderList_stubs.c:49:...
Type: Posts; User: BrokenShots
I changed it so it's consistent, but I didn't write the _ORDER_H part so I'm not gonna change it.
Anyway, the exact error is:
OrderList_stubs.c: In function `OLinit':
OrderList_stubs.c:49:...
That's not all the code. stdlib.h is included. Here's the struct for order:
#ifndef _ORDER_H
#define _ORDER_H
struct order {
char menuItem[51]; /* menu item ordered */
char...
I'm having a problem using malloc to create an array of hashNodes. When I try to compile I get an incompatible types in assignment error. Here's the code:
struct hashNode{
Order *o;
...
Thanks, I see what I did wrong. I changed the 10 to an 11 and now it works. I can't believe I wasted all that time on such a stupid little mistake. Anyway, I'm using the loops since I was having...
This has been driving me crazy for the past few hours. I'm attempting to take in two char pointers and a float as parameters. I then take the first 10 letters of the first char pointer and assign...
One more question if you don't mind.
I'm using the #define print_int(x) printf("Variable " #x "= %d\n", x) method; but mine looks like this:
#define print_int(x) printf(#x "\t%d\t %d %% \n", x-1,...
Awesome, I really appreciate the help. Thanks.
That makes sense. Too bad it doesn't help me. Thanks anyway.
Hello everyone. I'm new to C and I'm having trouble printing a variable's name.
Such as if I have int a =2, is there a way to print "a".
I would like my print statement to look like:
...