Re: Reading a file???



1) This isn't exactly GTK+ related, you may want to read up on C
   programming first.

2)
gchar temp2;
...
strcpy(temp2,ent->d_name);        // <- It crashes here...possibly the 'ent->d_name'???

You need a char* (or gchar*) to pass into strcpy. And you need to
preallocate it. And don't use strcpy, it's prone to buffer overflows - use
on of the glib string utility functions instead, there are some which even
preallocate a target buffer for you.


Regards,

Filip

-- 
<liiwi> www.benefon.fi is running Microsoft-IIS/4.0 on Solaris
<netgod> neat trick
<liiwi> hmms. how come I think that netcraft is on crack



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]