Let's fix that code, so that you don't fall into the "C+" darkness, as well:
Code:
#include <iostream>
#include <fstream>
#include <vector>
int main()
{
std::vector<std::string> holder;
std::string filename, word;
std::cout << "filename equals: ";
std::getline(filename, std::cin);
std::ifstream inputobject(filename.c_str());
inputobject >> word;
holder.push_back(word);
while(inputobject.good())
{
holder.push_back(word);
inputobject >> word;
}
return 0;
}
This fixes the code to be real C++ code and not C-mix.
I cannot speak for any bugs in the code, however.