Just returned to programming in C++.
the errors i get:
request for member begin in sent is of non-class type char[30]
request for member end in sent is of non-class type char[30]
char sent[] = "need to break this shiat down";
for(vector<string>::iterator it=sent.begin(); it!=sent.end(); ++it){
if(*it == " ")
cout << "\n";
else
cout << *it << endl;
}
should i change the char to string or define the vector differently?
You can also use streaming to throw out the whitespace and throw in newlines.
Result: