Skip to content

Commit cbcca17

Browse files
author
XuhuaHuang
committed
Studying void pointers
1 parent 634559d commit cbcca17

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

RawPointer/void_ptr.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* Some compilers permit pointer arithmetic with void pointers, however, assuming
2626
* the size of void is 1 and so you are essentially working with a block of byte data
2727
*
28+
* @warning must be careful in casting, because the compiler will assume the programmers know what they are doing
2829
*/
2930
int main() {
3031
std::nullptr_t np = nullptr;

0 commit comments

Comments
 (0)