20 C:\Dev-Cpp\project333 misc\stringtolowercvc.cpp cannot convert `std::string' to `char*' for argument `1' to `char* strlwr(char*)'
but all i want to do is convert the entire string to lower case.
Code:
string s;
while(getline(in, s )) { // Discards newline char
out << strlwr(s) ;
} // end while
also tried
Code:
string s;
while(getline(in, strlwr(s) ) ) {
out << s ;
}
same error but but but but it work in c. included are iostream string even tried cstring. fstream for file rw.
after doing several searchs i found transform() i would like to stick with strlwr() that i know for now. read through thinking in cpp vol 1. looking for some type of clue to get it working. even tried strlwr(&s) nope.
delimiter prob
25 C:\Dev-Cpp\project333 misc\stringuntokin.cpp `get' undeclared (first use this function)
29 C:\Dev-Cpp\project333 misc\stringuntokin.cpp no match for 'operator!=' in '(&words)->std::vector<_Tp, _Alloc>::operator[] [with _Tp = std::string, _Alloc = std::allocator<std::string>](((unsigned int)i)) != '.''
29 C:\Dev-Cpp\project333 misc\stringuntokin.cpp no match for 'operator!=' in '(&words)->std::vector<_Tp, _Alloc>::operator[] [with _Tp = std::string, _Alloc = std::allocator<std::string>](((unsigned int)i)) != ',''
yes same error twice
Code:
int main() {
vector<string> words;
ifstream in(...
ofstream out(...
string word;
// string s;
//while(getline(in, s)) // Discards newline char
//out << s ; // outline
while(get(in , word) )
words.push_back(word);
for(int i = 0; i < words.size(); i++) {
cout << words[i] ; //endl removed
while(words[i] != '.' | words[i] != ',' ) out << words[i] ;
}
try change getline() to get(). prob is with while delimiter removal.