C
Chris
Hi,
using .NET classes, how can you write a 'myobject' to a file with one
command, as in C :
struct MyStruct
{
char m_name[20];
int m_age;
} myS;
myS.m_age = 20;
strcpy(myS.m_name, "Bob");
FILE* fp = fopen("test.txt", "w");
fwrite(&myS, sizeof(struct MyStruct), 1, fp); --> WRITE IN ONE GO
thnx
Chris
using .NET classes, how can you write a 'myobject' to a file with one
command, as in C :
struct MyStruct
{
char m_name[20];
int m_age;
} myS;
myS.m_age = 20;
strcpy(myS.m_name, "Bob");
FILE* fp = fopen("test.txt", "w");
fwrite(&myS, sizeof(struct MyStruct), 1, fp); --> WRITE IN ONE GO
thnx
Chris