| | |
Emdash
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
It is not UNICODE -- its just a character from a special font. If you print that out (see below) you will see that it has a decimal value of -105.
So in your program just check for a character whose ascii value is -105 and change it to --.
At least that's how it works on an American keyboard and Vista Home. Other keyboards might be different, I don't know.
C++ Syntax (Toggle Plain Text)
int main() { char c = '—'; cout << c << " " << (int)c << "\n"; return 0; }
So in your program just check for a character whose ascii value is -105 and change it to --.
At least that's how it works on an American keyboard and Vista Home. Other keyboards might be different, I don't know.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
•
•
•
•
if I have a variable called text of type char* then
What should I write in VC++ so that it assigns emdash value in the variable text
2. Type char* variable points to a single char or to an array of char, it does not contain any chars.
c++ Syntax (Toggle Plain Text)
const char* pemdash = "\x97"; // Now *pemdash expression returns emdash character value // See #1 above... char emdash = '\x97'; // it's emdash in most of code pages...
Last edited by ArkM; Dec 18th, 2008 at 2:38 am.
![]() |
Other Threads in the C++ Forum
- Previous Thread: Lining Chart
- Next Thread: What kind of Jobs can you get knowing C++
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer dll download dynamiccharacterarray email encryption error file forms fstream function functions game generator getline givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






