Problem with std::vector

Hi,

Probably this is a stupid question. I am facing problem with std::vector in root 5.12/00.

void test()
{
	std::vector<int> n;

	for(int i=0; i<10; i++){
		n.push_back(i);
	}
	std::cout << n.size() << std::endl;
}

error:
Error: Can’t call vector<int,allocator >::push_back(i) in current scope test.C:9:
Possible candidates are…
(in vector<int,allocator >)
*** Interpreter error recovered ***

Thanks

Hi,

Either you have not build the cintdlls (cd $ROOTSYS; gmake cintdlls) or this is one of the bug we fixed since 5.12/00.

Anyway, you can work-around this problem by simply compiling your macro (via ACLiC).

Cheers,
Philippe

Hi,

Actually, I am using the pre-compiled (binary) version for FC5.

Thanks.

So the solution is to either upgrade to a new version of ROOT or use the ACLiC work around.

Cheers,
Philippe