Oct 21, 2004 #1 ollen Technical User Joined Oct 21, 2004 Messages 2 Location GB What is the VC command for VB chr (Returns the character associated with the specified ANSI character code.) function ?
What is the VC command for VB chr (Returns the character associated with the specified ANSI character code.) function ?
Oct 21, 2004 #2 timmay3141 Programmer Joined Dec 3, 2002 Messages 468 Location US WideCharToMultiByte converts strings, if you just want to convert a single character I think you can just cast it normally (char c = (char)OtherChar. Upvote 0 Downvote
WideCharToMultiByte converts strings, if you just want to convert a single character I think you can just cast it normally (char c = (char)OtherChar.
Oct 22, 2004 Thread starter #3 ollen Technical User Joined Oct 21, 2004 Messages 2 Location GB Will that give me like with the chr function ? ex: MyChar = Chr(65) ' Returns A. MyChar = Chr(97) ' Returns a. Upvote 0 Downvote
Will that give me like with the chr function ? ex: MyChar = Chr(65) ' Returns A. MyChar = Chr(97) ' Returns a.
Oct 22, 2004 #4 PerFnurt Programmer Joined Feb 25, 2003 Messages 972 Location SE There is no need for 'convect char to ascii or vice-versa' functions in C++ since the char type is actually an integer itself. ie Code: char ch1 = 'A'; // 'A' is really just another way of writing 65 char ch2 = 65; // ch2 == 'A' char ch3 = 'A' + 1; // ch3 == 'B' /Per "It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure." Upvote 0 Downvote
There is no need for 'convect char to ascii or vice-versa' functions in C++ since the char type is actually an integer itself. ie Code: char ch1 = 'A'; // 'A' is really just another way of writing 65 char ch2 = 65; // ch2 == 'A' char ch3 = 'A' + 1; // ch3 == 'B' /Per "It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure."