Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

VC typeid example

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 1,82 sec, absolute running time: 0,21 sec, absolute service time: 2,04 sec 
edit mode |  history  | discussion
myint has type: int
mystr has type: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >
mydoubleptr has type: double * __ptr64
50
std::cout<<myint has type : class std::basic_ostream<char,struct std::char_traits<char> >
printf("%d\n",myint) has type : int
reference to non-polymorphic base: struct Base
reference to polymorphic base: struct Derived2
mydoubleptr points to double
bad_ptr points to...  caught Attempted a typeid of nullptr pointer!

    
                
λ
.NET NoSQL database for rapid development