Hello again. I would like to thank everybody for the help. I have another homework question.
I need to use the cin.get() in a user defined function. I can get it to work just fine out of the function I created but as soon as I put it in the function I created it does not work.
1 2 3 4 5 6 7 8
void wordToNumber(char word)
{
cout << "Enter a seven letter word to be converted into a phone number: ";
cin.get(word);
cout << word << endl;
}
and this is how I call the function in the main after the prototype.
If your program isn't too long, can you copy paste it here so we can see? And if it's too big, use a free tool like pastebin or codepad and give us the link to it.
Edit: Ignore that. When you call the function, you don't include the data type of the variable you're passing. To put it simply, remove char from your call to wordToNumber in main.
Thank you so much. Dang it. It was an easy fix I am so confused with this homework ass. I think I am over thinking it. We have to create a program that converts words into phone numbers and I don't even know where to begin.
Create a digester function that takes an array of chars. The function should get each position and depending on the letter in each position the function should assign it a number in a new array and then print it to main