| | |
from FORTRAN to C++
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
You don't need a function for that. Example:
Regards Niek
C++ Syntax (Toggle Plain Text)
char ch = 'a'; int i = ch; cout << "Char " << ch << " = ASCII: " << i << endl;
Regards Niek
C and C++ languages really don't have a character data type -- char is readlly just a one-byte integer. Characters such as 'a', 'b', etc can be represented in char, int, or long because internally they are just integers and have an integer value. What you see as on the screen or on paper is just the representation of the letter and depends on the font that is used to print it.
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.
![]() |
Similar Threads
- Visual C++ V6 and Fortran Developer Studio V6 (Legacy and Other Languages)
- how to call dos command in C/fortran? (C++)
- linking java with fortran under Windows OS (C++)
- Problem trying to run old fortran based program in win xp (Windows NT / 2000 / XP)
Other Threads in the C++ Forum
- Previous Thread: How to refresh the screen?
- Next Thread: Need help checking for repetition in array
| Thread Tools | Search this Thread |
api array arrays based binary bitmap c++ c/c++ calculator char char* class code coding compile console conversion count data database delete deploy desktop developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game getline givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib linkedlist linker list loop looping loops map math matrix memory multiple news node number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg sorting string strings temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






