Sorry did not see
C
Oh still C , hehehehe -:) if it is a C than he should go to a C form, here is a C++ form , just kidding :-)
if no class , than no fstream, Oh God, Only
FILE
and
array
and
char
, it means a lot of code that do a little...
@
neoworld
you may write each line into a new file, e,g file1.txt, fil2.txt..., filen.txt) and at the end start from the last filen.txt till file1.txt and write each into the targetfile...... Oh God, I am happy that you created
C++
:-) I have no idea about
C
Some how I remember that C supports
struct
, but I am not sure, if it does than
1 2 3 4 5
|
typedef struct Customer{
unsigned int account;
char[some_length_here] name;
double balance;
}data;
|
and If does than you may also be able to create an array of type Customer, just try it :-)
may be something like
|
data datas[20] ;// no idea about C as said before, but it should work
|
if the above does not work you may try
data* datas = (data*)malloc(sizeof(data) * 20) ; // try it yourself, I just suggest it
If all this thing work than you may do the rest easily
hope it help