Hi,
I have a problem here and hope any experts out there could help. I used ODBC to import a database. This database has been successfully loaded into a new storage structure I named it as VisualTable which can essentially be perceived as a matrix with integer entries. My problem is now how to load this data stored in VisualTable? This structure with the code as follows:
VirtualTable::Load(ifstream &stream)
{
int objects;
int attributes;
//Load table.
if (!Ouput::Load(stream, objects) || !Output::Load(stream, attributes))
return false;
....
}
I used:
ifstream stream;
CDialogTable odbc(NULL);
String strQuery = odbc.tablestring;
stream.open(strQuery.GetBuffer(), ios::in | ios::nocreate);
... The compilation up to this stage does not give any problem.
However, when I start to use this:
if (!VirtualTable::Load(*stream)) {
Message::Error("Unable to open "
return NULL;
}
I got this error:
D:\Test\MainFrm.cpp(196) : error C2100: illegal indirection
D:\Test\MainFrm.cpp(196) : error C2352: 'VirtualTable::Load' : illegal call of non-static member function
D:\Test\system/virtualtable.h(73) : see declaration of 'Load'
My database stored in the VirtualTable can not be simply fed into the LOAD function. How to bridge this gap so that I can use the load function as shown above?
Please help...............
cheers,
I have a problem here and hope any experts out there could help. I used ODBC to import a database. This database has been successfully loaded into a new storage structure I named it as VisualTable which can essentially be perceived as a matrix with integer entries. My problem is now how to load this data stored in VisualTable? This structure with the code as follows:
VirtualTable::Load(ifstream &stream)
{
int objects;
int attributes;
//Load table.
if (!Ouput::Load(stream, objects) || !Output::Load(stream, attributes))
return false;
....
}
I used:
ifstream stream;
CDialogTable odbc(NULL);
String strQuery = odbc.tablestring;
stream.open(strQuery.GetBuffer(), ios::in | ios::nocreate);
... The compilation up to this stage does not give any problem.
However, when I start to use this:
if (!VirtualTable::Load(*stream)) {
Message::Error("Unable to open "
return NULL;
}
I got this error:
D:\Test\MainFrm.cpp(196) : error C2100: illegal indirection
D:\Test\MainFrm.cpp(196) : error C2352: 'VirtualTable::Load' : illegal call of non-static member function
D:\Test\system/virtualtable.h(73) : see declaration of 'Load'
My database stored in the VirtualTable can not be simply fed into the LOAD function. How to bridge this gap so that I can use the load function as shown above?
Please help...............
cheers,