Linked Questions

17 votes
6 answers
64k views

I'm trying to convert a string to lowercase, and am treating it as a char* and iterating through each index. The problem is that the tolower function I read about online is not actually converting a ...
user83676's user avatar
  • 379
5 votes
4 answers
3k views

Let's suppose I want to write my own manipulator for input and output. cin >> mymanip >> str; or cout << mymanip << str; What I want that mymanip does is toggle case the ...
user7140484's user avatar
3 votes
4 answers
3k views

I have a requirement wherein my C++ code needs to do case insensitive comparison without worrying about whether the string is encoded or not, or the type of encoding involved. The string could be an ...
Maddy's user avatar
  • 1,409
-1 votes
1 answer
9k views

So I am having troubles. My professor wants me to write a basic program that adds up costs and outputs the rate for a cable company based if its a residential package or a business package using if ...
user avatar
0 votes
4 answers
11k views

I am having trouble getting started with a program. I need to read in each word from a file, then convert it to lower case. I would like to std::cout each word after I find it. I assume I need to use ...
user1128637's user avatar
0 votes
2 answers
6k views

I'm just learning C++ (1 week of experience) and was trying to write an input validation loop that ask the user to enter "Yes" or "No". I figured it out but have a feeling there's a better way of ...
tho121's user avatar
  • 3
0 votes
2 answers
6k views

How do I implement a c++ script to search a group of characters from an character array.The search characters are not case sensitive.For an example, I key in "aBc" and the character array has "abcdef" ...
nubbear's user avatar
  • 109
1 vote
4 answers
1k views

I am iterating through a list and through a vector. Both are filled with wstring s. I need to compare the two strings they are pointing at and find out if "wstring1" exists in another "wstring2". n ...
Lumpi's user avatar
  • 2,841
0 votes
5 answers
2k views

I have method that find occurrences of string in other string. My question is how to make it to do no difference between small and capital letter? int occurrences = 0; string::size_type start = 0; ...
IntoTheDeep's user avatar
  • 4,137
2 votes
6 answers
3k views

I'm attempting to order a list input from a file alphabetically (not lexicographically). So, if the list were: C d A b I need it to become: A b C d Not the lexicographic ordering: A C b d I'm ...
Victor Brunell's user avatar
1 vote
2 answers
9k views

in this code i'm comparing between two strings i did it correctly, but i don't want to consider the letters' case. for ex: first string: aaaa, second string: aaaA. the output should be 0 or equal. ...
Osama Nagi's user avatar
3 votes
3 answers
4k views

Okay, so I'm building a program for a college class, it's a simple program that uses structures to simulate building a database of user information along with usernames and passwords. For extra ...
Warren Smith's user avatar
9 votes
0 answers
4k views

I've read in several places that boost::algorithm::to_upper/to_lower are not ok for utf8: http://www.boost.org/doc/libs/1_51_0/libs/locale/doc/html/conversions.html How to convert std::string to lower ...
Daniel Pinyol's user avatar
1 vote
1 answer
3k views

I am using one vector of strings and the strings are not in lower case. I want them to covert to lower case. For converting string to lower case, I am using following method. std::transform(...
Arun's user avatar
  • 2,429
0 votes
2 answers
877 views

I have an vector word_list, and i want to find an word in word_list. I use function bool Mylayer::existWord(vector<string> word_list, string word) { if (std::lower_bound(word_list.begin(), ...
Mr Vy's user avatar
  • 15

15 30 50 per page