hi,
i'm troubled by this unknown error with STL vector. i'm simplifying my code just to illustrate the problem.
struct A
{
int a;
int aa;
};
class B
{
public: void b();
private: std::vector<A> _a;
};
void B::b()
{
A temp;
_a.push_back( temp );
}
the program crashes at b() where the push_back is done. It is an exception error. I'm using MSVS .net.
appreciate any advice.
gab
Error Using Stl Vector - Pls HelpSTL vector
Page 1 of 1
2 Replies - 1292 Views - Last Post: 02 December 2004 - 07:43 AM
Replies To: Error Using Stl Vector - Pls Help
#2
Re: Error Using Stl Vector - Pls Help
Posted 01 December 2004 - 10:28 PM
im using gcc 3.3.4 20040623
and get no error
This is the code i ran
and get no error
This is the code i ran
#include <iostream>
#include <vector>
struct A
{int a;
int aa;};
class B
{public: void b();
private: std::vector<A> _a;};
void B::b()
{A temp;
_a.push_back( temp );}
main()
{B test;
test.b();
return 0;}
#3
Re: Error Using Stl Vector - Pls Help
Posted 02 December 2004 - 07:43 AM
Hmmm...no error here, either. And I ran Nova's code exactly on both gcc and VS.NET. Are you sure the problem wasn't eliminated when you simplified the code for posting?
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|