p->output=fopen(*filename,"w");
should be:
p->output=fopen(filename,"w");
Type: Posts; User: sand_man
p->output=fopen(*filename,"w");
should be:
p->output=fopen(filename,"w");
Fixed it for anyone interested
void insertProductNode(char *brand, char *name, unsigned price, unsigned qty, ProductNodeType **head){
ProductNodeType *node = malloc( sizeof(ProductNodeType)...
Thanks iMalc. As I thought, I need to go back and start again.
If I remove either of the breaks it seems to just hang (or loop infinitely).
I'm starting to think my logic is off a bit here. I think I've been looking at it for too long.
I'm not sure what else to provide! I'm guessing here too.
Thanks for your help. I'll keep looking
In fact, if I use your function, they are inserted in the same order as the csv file.
Thanks but I had already tried that and trying again now I still don't get a sorted list. There must be something I'm missing somewhere else in the program.
I'm loading data from a csv file but I...
Hi all.
Been a long time since I posted here and I'm a bit rusty with my C.
I'm trying to write a function that inserts into a linked list where node->name is in alphabetical order.
This is...
This should be the first thing you ever learn about C/C++.
int main(){
return 0;
}
What you posted may compile and function ok but it is against the standard.
I play dwarf fortress from time to time. It's evolved to be quite different to the classic rogue like games but I love it's complexity and originality.
Just because something costs money doesn't mean that it is better than something that is free.
This sounds like homework. Have you made an attempt? Please post some code to show that you have.
I'll give you the benefit of the doubt and give you a hint. All the information you need should be...
Should be in a museum that's for certain :D
Who said anything about Linux anyway? The OP asked about UNIX. POSIX is POSIX though right?
man page fork section 2
ERRORS
[EAGAIN] The system-imposed limit MAXUPRC (<sys/param.h>) on
the total number of processes under execution by a
...
Based on this post I would say the OP is just a troll
I haven't used slackware in a long time either but I thought they did in fact have a package manager, it just doesn't automatically resolve dependencies.
Nobody is going to go through all that especially since it's not even indented.
Just check to make sure all the malloc() calls are matched with a free()
Do they have an rss feed? If they did you wouldn't need to program anything...unless it was an rss reader.
Press the compile button?
Arch + Openbox user here.
Arch is great because it doesn't put useless junk on your system. After installation you have the bare necesaties for a Linux system. You then use Arch's package manager...
Wasted effort.
Just use different names.
Besides, if you are implementing a double-linked list, what use is a single-linked list?
http://www.directfb.org/
Looks like fun. But writing a GUI framework doesn't.
I would just use Gtk or Qt.
But is it possible to redefine a user defined type?
typedef struct Node
{
int data;
struct Node *next;
} Node;
It's probably easier to use GNU or MS compilers.
Code::Blocks with mingw32 is far better than Borland Builder IMO anyway :p
My guess is that you are new to programming and BB is the first compiler...