vector of strings out of range - XML

Hi All
this snippet of code throws an out-of-range error, but unsure what I am doing wrong?
Trying to load a series of XML entries into strings…
In testApp.h

  
  
vector <string> printStrings;  
  

and in testApp.cpp

  
  
int numEntries = XML.getNumTags("entry");  
  
    // iterate through <entry> tags  
    for (int i = 0; i < numEntries; i++) {  
		  
		string tempString;  
		tempString = XML.getValue("entry:title", "", i).c_str();  
		printStrings.push_back(tempString);  
}  
  

when I build it throws the error?
I thought you would be able to do a cout << printStrings.at(0) and get a value, but the compiler quits before that…
cheers!