I have a file named \"items.dat\" with following contents in the order itemID, itemPrice and itemName.
item0001 500.00 item1 name1 with spaces item0002 500.
The std::ws IO manipulator can be used to discard leading whitespace.
A compact way to use it is:
getline(fileRead >> std::ws, tmpItem[i].name);
This discards any whitespace from the ifstream before it's passed to getline.
ifstream
getline