This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Type conversion from type Elf32_Ehdr to type const char


Hi,

I would like to know how to convert from type Elf32_Ehdr to type const char

Here are some things I tried, but they all failed.
ex.
    Elf32_Ehdr Ehdr;
    const char tmp = static_cast<const char>(Ehdr);

ex
    Elf32_Ehdr Ehdr;
    const char tmp = const_cast<const char>(Ehdr);

ex
    Elf32_Ehdr Ehdr;
    const char tmp = (const char)Ehdr;

ex
    Elf32_Ehdr Ehdr;
    char tmp = (char)Ehdr;






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]