Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is String to char possible?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I'm trying to make something called a "Histogram," using Microsoft Visual C++. The object is to output the quantity of each letter within the String input. I'm trying to isolate certain characters by using string to into conversion, but am completely unsuccesful at isolating a single character from the String. ANY SUGGESTIONS?
 
it surely works, like this :

char MyString[10] = "ABCDEF";
char c;

c = MyString[3]; // -> D
 
Take a look at the "mbstowcs" C run time function or "MultiByteToWideChar" Platform SDK API call.

Hope this helps! Happy coding! :) *~-> EOR Candy <-~*
 
My apologies. I'm suffering from a brain hiccup. I posted my previous method twice.

*~-> EOR Candy <-~*
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top