Use of fgets, puts, rewind in Gtk+
- From: Sucheta Ghosh <sucheta_t isical ac in>
- To: gtk-app-devel-list gnome org
- Subject: Use of fgets, puts, rewind in Gtk+
- Date: Thu, 12 Oct 2006 14:12:19 +0530 (IST)
Hello,
I wished to read a file and get some lines from there like this:
-----
fp=fopen("filename", "r");
for(k=0; k<8; k++){
n=a[k];
for (i=1; i<=n; i++) //Here 'n' is the line number
fgets(s, 100, fp);
puts(s);
rewind(fp);
}
-----
-----
This is the code snippet, which is working so well after compiling with
'gcc' compiler, but when I added this code inside Gtk+ callback.c, a
runtime error is occuring before execution of 'fgets'. I have already
included 'stdio.h', but even then it is not executing.
Do you have any idea that how to overcome this problem?
Thanks & regards,
Sucheta Ghosh
Indian Statistical Institute, Kolkata
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]