Hopefully someone will be able to help me out with my problem here it is:
I need to make a program that ask a user to input a word. However when they input that word I need to convert the word to all lowercase letters so it can do a serach. This is my problem:
Every time I try to use tolower it gives me an error
"Cannot convert parameter 1 from 'char[11]' to 'int'
I notice that I can use this when the person only has to input one character, but when it's an entire word, tolower doesn't work.
Here is a sample of what I am trying to do (I switched some of the text around since it says don't post your source code). I tried to only put what I need, but if more code is needed, let me know I will glady add more if I need too.
Expand|Select|Wrap|Line Numbers
- #include <iostream>
- #include <iomanip>
- #include <string>
- #include <ctype.h>
- using namespace std;
- int main ()
- {
- char word[11];
- cout << "Please, enter the the word you need to search for";
- cin.getline(word, 11);
- word = tolower(word);
- cout << endl;
- }