Problem with STL vector on Panther 10.3.1
Problem with STL vector on Panther 10.3.1
- Subject: Problem with STL vector on Panther 10.3.1
- From: email@hidden
- Date: Thu, 13 Nov 2003 16:33:33 +0100
Hello,
I encountered a strange problem I have been unable to resolve. Apparently
the following code segment doesn't work at all for me:
int main (int argc, const char * argv[]) {
set< CLabelPoint > spt;
vector< CLabelPoint > cpt;
map< int, CLabelPoint > mpt;
CLabelPoint lp( 20, 10 );
spt.insert( lp );
mpt.insert( pair< int, CLabelPoint >(1, lp) );
assert( spt.size() == 1 );
assert( mpt.size() == 1 );
cpt.insert( cpt.begin(), lp ); // Here SIGSEGV
}
I've included vector, set and map headers in an extra header file. The
object CLabelPoint is properly created and contains two int members and an
empty vector. The set and map obviously work correctly since the asserts
worked but inserting into the vector fails, as does push_back, reserve,
resize ... a lot. Is this just me, is this a Panther problem with vector
headers, is it the CLabelPoint class? I don't know.
Any help would be greatly appreciated.
Thanks,
Sebastian
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.