Turbo C : not C++ ? OK.
This should work then :

Code: c
int WriteStruct(Student A)
{      FILE * FileOut;
        fopen(FileOut,"w");
        if (FileOut == NULL) return -1;
        fwrite(A, sizeof(A), 1, FileOut);
        fclose(FileOut);
        return 0;
}