C++ question: where does int() come from ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux