This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

STL help



Hello all,
I try executing the following program (which is using STL) under
linux by using gcc version 2.95.3:

#include <vector.h>
#include <iostream.h>
#include <algo.h>
#include <stdlib.h>

int main()
{
	vector<char> cvec;
	cvec.insert(cvec.begin(), 50, '/');
	fill(cvec.begin()+1, cvec.end()-1, '-');
	copy(cvec.begin(), cvec.end(), ostream_iterator<char>(cout));
	cout <<endl;
	return 0;
}


and it generates 'killed by signal 7' error during execution at 'cvec.insert' step.

Any help? 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]