The reinterpret_cast operator cannot cast away . You would need to do unsigned char* etherhead = (unsigned char*)buffer; (although you could use a static_cast also) To learn more about void pointers, take a look at 6.13 — Void pointers. [expr.static.cast] - GitHub Pages (int)') isn't a valid override of 'Superclass.method' ('void Function(dynamic)'). 1) const_cast can be used to change non-const class members inside a const member function. 我正在完成 BS 的"A Tour of C++",并且正在重新创建他在整个过程中使用的 Vector 类,至少是前四章。. closed account ( Dy7SLyTq) chars ARE ascii. (void*)0 in C & C++. 3 It looks like a compiler extension where __m256i is a typedef for 4 long long int s to form a 256 bit integer type. For example —. static_cast in C++. Type Casting and Type Conversion In C++: Part 2 | Coding Ninjas Blog void (C++) | Microsoft Docs The reinterpret_cast operator can be used for conversions such as char* to int*, or One_class* to Unrelated_class*, which are inherently unsafe. This casting operator is basically a substitute for normal casting operator. giblit (3750) I disagree DTSCode you can convert from ascii to char easy. www.mail-archive.com It also looks like you are trying to cast whatever value values holds + i into a void*. Explanation: In the above example, we try to cast the char* to type int*, an invalid conversion. Why can't I static_cast to a pointer type? - C / C++ static_cast: This is used for the normal/ordinary type conversion. The ToString method is always present, since the ToString method is defined by the Object class and therefore is either inherited or overridden by all managed types.. using System; public class Example { public static void Main() { object value = 12; string s .