Okay, I'm completely stuck loading a struct from a binary file, saving looks fine to me but on loading i get a bad_allocation exception, may someone please show me how to load/save a struct like this(yes i searched for too many hours and 0 results)
Table struct has to be saved in a file, then loaded from the file; Columns and Rows are dynamic arrays.
If the load/save functions are needed please tell me and I'll post them.
Mfg,
Nullable.
Code:
typedef struct CColumn
{
int ID;
string UniqueName;
}Column;
typedef struct CVar
{
string ColName;
string Value;
}Variable;
typedef struct CRow
{
int Number;
Variable * Variables;
}Row;
typedef struct CTable
{
int ID;
int RowsCount;
int ColumnsCount;
string Name;
Column * Columns;
Row * Rows;
}Table;
If the load/save functions are needed please tell me and I'll post them.
Mfg,
Nullable.