question archive how can we read the following txt document(ifstream) and store in a string array in C++
Subject:Computer SciencePrice:9.82 Bought3
how can we read the following txt document(ifstream) and store in a string array in C++.
abc efg hello
world
test
the string array should be = {"abc","efg","hello", "world", "test"};
I don't know what to do with the extra spaces.
Purchased 3 times