casting tag

14 questions


1 answers
63 views
0
When is reinterpret_cast used?

I'm confused when to write reinterpret_cast and static_cast.As far as I know, if you decide on type when compile, you use static castreinterpret_cast is in the case ofI know it's a feature that you sh...

2 years ago

1 answers
108 views
0
C++ Class Internal Type Conversion Question, const indicator

MyString.h (header source)// CMyString class internal instance and method declarationclass CMyString{public: explicit CMyString(const char* paramstr); CMyString(const CMyString &rhs); ~CMyString(v...

2 years ago

1 answers
74 views
0
auto convert? auto casting? On implicit casting in the CPP.

Constant *putsFunc = module->getOrInsertFunction(puts, putsType);There's a code like this.If I write it like this, the return type on the right is automatically casted as the return type on the lef...

2 years ago

1 answers
135 views
0
Why can't I convert the automatic version of C language when it's really simple?

#include <stdio.h>int main(void){ int c; float d = 5.6, e = 8.4; c = d + e; printf(c = d + e = %.2f \n, (float)c); return 0;}Isn't float d=5.6 and float=8.4 automatically converted to int, so it...

2 years ago
« - 2 -

© 2024 OneMinuteCode. All rights reserved.