for(std::iterator *iter = Text.start(); iter != Text.end(); iter++) {
saveIt << *iter;
}
I get error: missing template arguments before ‘*’ token.
error no2. iter was not declared in this scope.
error no3. about Text.start() it should be Text.begin()
Never learned iterator so i have no idea what i am doing
for (std::vector<sf::String>::iterator itr = strings.begin(); itr != strings.end(); ++itr)
Is working, but as i can see it does not save any value to .txt
this i add:
for (std::vector<sf::String>::iterator itr = strings.begin(); itr != strings.end(); ++itr)
{
saveIt << *itr // or saIt << &itr or saveIt << itr i get error
}
error: no match for ‘operator<<’ in ‘saveIt << itr.__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator* [with _Iterator = sf::String*, _Container = std::vector<sf::String>, __gnu_cxx::__normal_iterator<_Iterator, _Container>::reference = sf::String&]()’|
for c++11
for (auto itr = strings.begin(); itr != strings.end(); ++itr)
for (sf::String& s : strings)
I dont have c++11, since i have gcc 4.6.3. Gcc site stated that c++11 is partialy included in gcc4.7, and fully in 4.8.1.
FRex i havent tested your code, [yet] becouse i have no idea where to put it. Never did transfer from utf8 to anscii ... And i just looking how to write vector to .txt file noobish style