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.
A type conversion is where the compiler generates code to convert from one type to another. For instance, you might assign the value of a integer variable to a floating point variable, or vice versa. The compiler will do that for you. There is explicit type conversion, where you specify which type to convert to, and implicit type conversion, where it is implied by context, such as across an assignment or in a mixed expression.
"Type conversion" means pretty much the same thing in any programming language, and it's difficult to explain unless you already know something about programming.
Basically, a computer program can represent the number "25" (for example) in several ways. Type conversion is a way of converting between those ways. C++ is "strongly typed", which means the compiler will usually give you an error if you try to use a variable of one type in a way that expects a different type. Some languages (for example, Perl) are not strongly typed, and you can get away with these kinds of shenanigans, but in C++ you'd usually have to do "type conversion" to avoid the error.
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.
If you mean 61 angular degrees , they are already metric. If you mean 61 degrees Kelvin the conversion gives -212.15°C (Centigrade or Celsius If you mean 61° Fahrenheit the conversion gives 16.1°C If you men Réaumur the conversion gives 76,25°C
The same as in C, struct.
Use "typedef" : both in C and C++.
char x = "C"; if(char == 'C') { } else { }
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.
Object-oriented programming and stricter type-safety.
type operator- ();
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.
I guess you mean Java, there is no interface in C++.
same the types used in C. that is int...char...float...