Hi.
I've been searching the net, but I can't seem to find any useful tips/guides/FAQ's on how to create a small program that can stream from an online radio, ie. www.di.fm/mp3/trance96k.pls.
...
Type: Posts; User: XorpiZ
Hi.
I've been searching the net, but I can't seem to find any useful tips/guides/FAQ's on how to create a small program that can stream from an online radio, ie. www.di.fm/mp3/trance96k.pls.
...
No one? :|
Ahh yes. Hmm, didn't help though :/
fread still returns 0.. I'm not sure where the error is.
Any other suggestions? This program have annoyed me for the past week :(
Okay :)
Savetofile();
void savetofile()
{
FILE *fp;
struct prs *this;
That seemed to help. Now it's writing fine, afaik :)
But fread still returns 0..
Thank you for the help so far! :D
Sorry Salem, but as I already said, I'm not that good at C :)
And fread still returns 0.. so maybe it's my savetofile() function thats not working? Just wondering though, as I really have no idea...
Here is my struct;
struct prs
{
char name[255];
int number;
struct prs *ptrnext;
};
What I don't understand is why fread returns 0..
I've tried singlestepping my program and either I get an access violation, when I call the readfromfile() function or fread returns 0.
Hi again :)
I think I understand the basics of Linked Lists.. main problem for me, is how to write them to a file and read them out again.
I've been to google, alltheweb and msn search. And I...
Hmm I can't find anything about gets() in the FAQ. Perhaps I'm not looking the right place :|
Anywho, how do you do #1?
something like;
while(fread(ptrthis, sizeof(*ptrthis), 1, fp) ==1)...
Okay, int main it is then :P
But how should I link them together?
Something like this?
while(fread(ptrthis, sizeof(*ptrthis), 1, fp) ==1)
{
Hi, I'm trying to make a simple database, where I write a linked list to a file and then read it out again.
I've been working on this for the last week and I've been stuck most of the time hehe :D...