Apr 12, 2013 at 4:41pm
I can't view the screenshot for some reason. What problem are you having? The code appears to work.
Apr 12, 2013 at 6:03pm
That's because a string (char*)
always has the characters and then the ending character (null)
. So for example:
You think this string contains:
hello
but it really contains:
hello[NULL]
so when printing a char* just use:
std::cout<<mychar;
that does the same thing as what you are trying to do but it formats it properly.
Last edited on Apr 12, 2013 at 6:04pm
Apr 12, 2013 at 7:10pm
Whats the program supposed to be doing anyway?
Apr 12, 2013 at 8:06pm
It is a simple program.
Search words by first character...
Apr 12, 2013 at 8:09pm
So you enter words then you enter a letter to search for and it prints all the words that start with that letter?
Let us know if you run into anymore problems you need help on. We would be more then willing to help out.