Link to home
Start Free TrialLog in
Avatar of mudface061200
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;
}
Avatar of Chase707
Chase707

What is the exact linker error that you are getting?

Chase707
ASKER CERTIFIED SOLUTION
Avatar of Jan Louwerens
Jan Louwerens
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.

Avatar of mudface061200

ASKER

It was actually a compiler issue, this was the first legitimate answer.  Thanks to all who made suggestions.