int *foo;
float *bar;
// c++ style:
foo = reinterpret_cast< int * >(bar);
// c style:
foo = (int *)(bar);
Related Contents:
- What does “static” mean in C?
- How do I determine the size of my array in C?
- Why does the C preprocessor interpret the word “linux” as the constant “1”?
- Concept behind these four lines of tricky C code
- Stack smashing detected
- What are the most common naming conventions in C?
- Can’t understand this way to calculate the square of a number
- How does this piece of code determine array size without using sizeof( )?
- What is the difference between memmove and memcpy?
- Turn a simple socket into an SSL socket
- Why do I get “a label can only be part of a statement and a declaration is not a statement” if I have a variable that is initialized after a label? [duplicate]
- How does strtok() split the string into tokens in C?
- How can I tell if a library was compiled with -g?
- Undefined reference to `sin` [duplicate]
- What are vdso and vsyscall?
- malloc for struct and pointer in C
- Difference between surface and texture (SDL / general)
- Does stack grow upward or downward?
- C char array initialization: what happens if there are less characters in the string literal than the array size?
- How can I read an input string of unknown length?
- How to use /dev/random or urandom in C?
- How do you declare string constants in C?
- How to Declare a 32-bit Integer in C
- What if I don’t write default in switch case?
- How to prevent GCC from optimizing out a busy wait loop?
- Passing an array by reference in C?
- Left shifting with a negative shift count
- Why is memory allocation on heap MUCH slower than on stack?
- Check glibc version for a particular gcc compiler
- CMAKE – How to properly copy static library’s header file into /usr/include?
- Can a C macro definition refer to other macros?
- Append to GNU make variables via command line
- Getting a weird percent sign in printf output in terminal with C
- Time in milliseconds in C
- How to convert big endian to little endian in C without using library functions?
- How do I link object files in C? Fails with “Undefined symbols for architecture x86_64”
- Using if (!!(expr)) instead of if (expr)
- What is the best IDE for C Development / Why use Emacs over an IDE? [closed]
- Copying a part of a string (substring) in C
- Type of #define variables
- What is the difference between static and extern in C?
- How to read, understand, analyze, and debug a Linux kernel panic?
- Are prototypes required for all functions in C89, C90 or C99?
- getc() vs fgetc() – What are the major differences?
- Pass an array to a function by value
- How to define and work with an array of bits in C?
- Associative arrays in C
- Difference between INT_MAX and __INT_MAX__ in C
- Win32 – Backtrace from C code
- Implicit declaration of function ‘close’