M
MJK
Hello All:
I am trying to use sprintf to create files within a loop. Using
something like this:
char filename[255];
for( i = 1; i < 10 ; ++i){
sprintf(filename,"/pp/wwwwww/MMMMMMMMMMM/SSS/fffffffff/
FFFFFFFF/CCCCCCCCCC%02dfffffffff.inp",i);
fp = fopen(filename,"w"); ....
and so on…
The problem is that in some of the files (in Linux) it gives me a
wired character like ^@^ but when I look at the file in Windows, it is
something like a bold 'i' which is not possible to copy it (error
message at textpad). When I make the filename like this:
sprintf(filename,"/CCCCCCCCCC%02dfffffffff.inp",i); ,everything is
fine. Any limitation in the number of characters in sprintf? Anybody
has any comments on this?
Thanks in advance,
Mohsen
I am trying to use sprintf to create files within a loop. Using
something like this:
char filename[255];
for( i = 1; i < 10 ; ++i){
sprintf(filename,"/pp/wwwwww/MMMMMMMMMMM/SSS/fffffffff/
FFFFFFFF/CCCCCCCCCC%02dfffffffff.inp",i);
fp = fopen(filename,"w"); ....
and so on…
The problem is that in some of the files (in Linux) it gives me a
wired character like ^@^ but when I look at the file in Windows, it is
something like a bold 'i' which is not possible to copy it (error
message at textpad). When I make the filename like this:
sprintf(filename,"/CCCCCCCCCC%02dfffffffff.inp",i); ,everything is
fine. Any limitation in the number of characters in sprintf? Anybody
has any comments on this?
Thanks in advance,
Mohsen