T
The unProfessional
I'm having difficulty figuring out a simple way to dump unmanaged structure
and/or class data to binary files.
In standard C++:
--------------------------
typedef struct tagS1
{
DWORD dwBlah;
CHAR szBlah[64];
} S1;
....
S1 s1;
FILE *fd = fopen ("c:\....", "wb");
fwrite (&s1, sizeof(s1), 1, fd);
fclose (fd);
--------------------------
I really don't want to have to move a ton of pre-defined structures to
managed code and use BinaryFormatters, pad my strings, etc.
I attempted to use fwrite in managed c++, but it appears to cause an error
in the internal file-locking mechanism.
Ultimately, I'm hoping to take advantage of some of the managed set,
especially easy GUI creation, but I need some pure-C++ functionality (such
as what's described above). Doesn't managed C++ support the standard C++
libraries? If not, isn't that contrary to it's purpose?
Any info or advice would be GREATLY appreciated
I'd like to harness some of the ease of the .net framework (better than
MFC), but without losing the ability to write regular old C++. Is it even
possible?
and/or class data to binary files.
In standard C++:
--------------------------
typedef struct tagS1
{
DWORD dwBlah;
CHAR szBlah[64];
} S1;
....
S1 s1;
FILE *fd = fopen ("c:\....", "wb");
fwrite (&s1, sizeof(s1), 1, fd);
fclose (fd);
--------------------------
I really don't want to have to move a ton of pre-defined structures to
managed code and use BinaryFormatters, pad my strings, etc.
I attempted to use fwrite in managed c++, but it appears to cause an error
in the internal file-locking mechanism.
Ultimately, I'm hoping to take advantage of some of the managed set,
especially easy GUI creation, but I need some pure-C++ functionality (such
as what's described above). Doesn't managed C++ support the standard C++
libraries? If not, isn't that contrary to it's purpose?
Any info or advice would be GREATLY appreciated
I'd like to harness some of the ease of the .net framework (better than
MFC), but without losing the ability to write regular old C++. Is it even
possible?