If your column data may contain spaces, better use "
around string or add '\t'
as delimiter.
You can reorder your code to use as shown below to ensure you don't read an empty line at last.
ifstream in("someData.txt");
while(in>>inputData[0])
{
in>>inputData[1];
}
Or even better if entry of second column in any line is missing.
std::string line;
while(getline(std::cin,line))
{
// Splitting into 2 in case there is no space
// If you colum may contain space, replace below lines with better logic.
std::istringstream iss(line);
inputData[0] = inputData[1] = default_value;
iss >> inputData[0] >> inputData[1];
}