in article
2lc0orFat0kvU1@uni-berlin.de, Jonathan Turkanis at
technews@kangaroologic.com wrote on 04/07/10 22:22:
[color=blue][color=green]
>> This program often crashes when I call on my "apples" or "oranges".[/color]
>
> What does 'call on' mean here?[/color]
Sorry, I should have said "access" or "read".
[color=blue]
> Assuming Apples and Oranges meet the requirements for being stored in
> a std::vector (CopyConstructible and Assignable),[/color]
This might be my problem, because they contain Objective-C objects (it's a
Macintosh program).
[color=blue]
> the only thing that
> is (possibly) wrong with the above is that apples is public.
>
> But this won't cause a crash. ;-)[/color]
Yes, I put that public member in there for some sleazy debugging ;).
in article j44Ic.3201$sa1.1219@newssvr17.news.prodigy.com, Phlip at
phlip_cpp@yahoo.com wrote on 04/07/10 22:18:
[color=blue]
> But before pushing anything back, any index might crash.[/color]
I understand that, but, for instance, a push_back() or size() should not
crash, which it does.
in article opsaylndpg212331@andronicus, John Harrison at
john_andronicus@hotmail.com wrote on 04/07/10 23:00:
[color=blue]
> ...they are on the heap. The are contained within an object
> which you allocated on the heap, therefore they are on the heap.[/color]
THANKS!
[color=blue][color=green]
>> Is there something inherently wrong with the above declaration?[/color]
>
> No, your problem is elsewhere.[/color]
Thanks very much for all the answers. I know I did not post much code, but
I didn't want to bother everyone with actually fixing the problem. I just
wanted to know if the problem was here or somewhere else. I think I've got
my answer...that it is somewhere else, maybe in my bastardizing of C++ with
Objective-C.
Jerry