• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem with STL vector on Panther 10.3.1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with STL vector on Panther 10.3.1


  • Subject: Re: Problem with STL vector on Panther 10.3.1
  • From: Ryan Wilcox <email@hidden>
  • Date: Thu, 13 Nov 2003 11:41:22 -0500

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/13/03, at 4:33 PM, email@hidden said:

>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;>
>    cpt.insert( cpt.begin(), lp ); // Here SIGSEGV
>}

I had problems with Codewarrior and vectors too (except in my case data stored
in the vector wasn't there when I went looking for it). I found that
initializing my vector to a certain size solved my problem.

While Josuttis' _C++ Standard Library: A Tutorial And Reference_ *seems* to
indicate that you can get away with not specifying an initial size for your
vector, it didn't work for me. Only when I specified an initial size did my
vector work as expected.

I'm not a C++ guru, so I don't know why, or even what the recommendations say.
I'm just reporting what I saw.

Hope this helps,
_Ryan Wilcox

================================================================
Wilcox Development Solutions:          http://www.wilcoxd.com
Toolsmiths for the Internet Age            PGP: 0x2F4E9C31

-----BEGIN PGP SIGNATURE-----
Version: PGP SDK 3.0.3

iQA/AwUBP7O0MG2DtKgvTpwxEQL63ACfVpWvhO3bXF/+9nzo6CJpltBzzo0An0Ox
lnDHJNVvQ6sAcKsKI3+zFjuK
=r9IH
-----END PGP SIGNATURE-----
_______________________________________________
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.

References: 
 >Problem with STL vector on Panther 10.3.1 (From: email@hidden)

  • Prev by Date: Making headers public in framework
  • Next by Date: "project and editor" window configuration
  • Previous by thread: Problem with STL vector on Panther 10.3.1
  • Next by thread: Re: Problem with STL vector on Panther 10.3.1
  • Index(es):
    • Date
    • Thread