A no converting type cast is a type cast where the underlying data type is intrinsically the same as the type being cast, thus no conversion is required. This will often occur when explicitly converting from one type definition to another when both are in fact the same definition.
For instance, type casting from an unsigned int to a size_t is a no converting type cast because the size_t data type is merely a type definition (typedef) for an unsigned integral. Thus type casting between any of the following would result in a no converting type cast:
unsigned
unsigned int
unsigned long
unsigned long int
size_type
size_t
Note that unsigned and long are both modifiers, not types. If you omit the type, int is assumed, thus the first four are fundamentally unsigned int.
Note also that a conversion and a type cast are not really the same thing, but they do similar jobs. A conversion is an implicit conversion between types while a type cast is an explicit conversion between types. In other words, they're both conversions, but not all conversions are type casts.
This is best demonstrated with some examples:
int i = 3;
In the above example, the literal constant 3 is implicitly int, thus this is an example of a no conversion type cast (same fundamental type).
long j = long (i);
The above example is also a no converting type cast because int and long are fundamentally the same type. Remember, long is a modifier, not a type in its own right, thus long int is implied, and a long int is fundamentally the same as an int.
unsigned int k = i;
The above example is an implicit conversion because the value of i (3) is assigned to a fundamentally different type to that of i.
unsigned int l = (unsigned int) i;
unsigned int m = static_cast<unsigned int> (i);
The above examples are explicit conversions (type casts). Both explicitly cast the integral 3 to an unsigned int.
Explicit conversion (type casting) between primitive types is usually unnecessary because the compiler knows how to convert between these types and it's generally not something the programmer need overly concern themselves with. However, it can sometimes be important to highlight the fact that a conversion is taking place. In these cases it is best to be explicit and the static_cast operator is the best way of making the cast stand out. Conversion to or from more complex objects should be handled by the object's themselves through class conversion operators that implement static_cast where appropriate, and dynamic_cast or reinterpret_cast when the conversion is more complex. Again, it can be important to highlight the fact a conversion is taking place so it's best to keep conversion operators to the absolute minimum and force consumers to be explicit with their conversions. You can also use const_cast to highlight the fact that the constness of a type is being converted.
The same as in C, struct.
char x = "C"; if(char == 'C') { } else { }
There is no such keyword or data type known as tbuffer in C++. It's most likely an user-defined identifier, possibly a text buffer. But without knowing its actual type or its context it's impossible to say what it means.
same the types used in C. that is int...char...float...
no
See related link. It's in C rather than C++, but conversion to C++ is fairly simple.
The same as in C, struct.
char x = "C"; if(char == 'C') { } else { }
Use "typedef" : both in C and C++.
It is used to distinguish between the C or C++
Yes, you can cast in C++, both statically and dynamically. Objects can also be cast provided the class designer implemented the appropriate conversion operators.
There is no such keyword or data type known as tbuffer in C++. It's most likely an user-defined identifier, possibly a text buffer. But without knowing its actual type or its context it's impossible to say what it means.
Object-oriented programming and stricter type-safety.
type operator- ();
I guess you mean Java, there is no interface in C++.
same the types used in C. that is int...char...float...
no