mudface061200
asked on
Inserting into a set
The following insert call produces a link error and I have no clue why. Any suggestions?
extern set<My_Data> My_DataSet;
...
bool My_Data::AddRecord( char * trackingNumber, char * scanInfo )
{
My_DataSet.insert(My_Data( trackingNumber, scanInfo ));//the link error is here
...
return true;
}
extern set<My_Data> My_DataSet;
...
bool My_Data::AddRecord( char * trackingNumber, char * scanInfo )
{
My_DataSet.insert(My_Data(
...
return true;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try creating an operator= function and a copy constructor for the My_Data class
Is My_DataSet actually declared in a file in your project?
Your example simply shows it as declared somewhere externally.
Your example simply shows it as declared somewhere externally.
ASKER
It was actually a compiler issue, this was the first legitimate answer. Thanks to all who made suggestions.
Chase707