This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
C++ question: where does int() come from ?
- From: "Michael Gong" <mwgong at cs dot utoronto dot ca>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Tue, 19 Dec 2006 23:15:52 -0500
- Subject: C++ question: where does int() come from ?
Following is a simple C++ program:
#include<iostream>
use namespace std;
int main() {
cout << "int value = " << int('A') << "\n";
}
It outputs the integer value of character 'A'.
Is the int('A') a function call provided by C++ library or the compiler
will do the conversion during compilation time ?
Regards,
Mike