Hi all,
For example I want to open and write file in iteration
using fopen. Here is that I've tried before.
==================
#define SIZE 10;
...
int i;
FILE *fp;
for(i=0;i<SIZE;i++){
if(i==0){
fp=fopen("file1.dat","w");
}
else if(i==1){
fp=fopen("file2.dat","w");
}
//so on
/*Program and writing data into file is here*/
fclose(fp);
}
....
========================================
I imagine if I have to set SIZE large number, I'll get
bored just to write if(i==0) until if(i==50). Any
suggestion how to overcome such problem using fopen ?
Titi
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/c-prog/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/