Search
 
SCRIPT & CODE EXAMPLE
 

CPP

c++ generic pointer

void*  gp;    //generic pointer
int*  ip;     //int pointer
char*  cp;    //char pointer

gp = ip;      //legal conversion
ip = static_cast<int*>(gp); //explicit cast required
                            //in C++ but not in C
cp = ip;      //illegal conversion
*ip = 15;     //legal dereference of pointer to int
*ip = *gp;    //illegal generic pointer dereference
Comment

PREVIOUS NEXT
Code Example
Cpp :: tabeau dynamique c++ 
Cpp :: c++ include < vs "" 
Cpp :: shortest path in unweighted graph bfs 
Cpp :: len in cpp 
Cpp :: how to find factorial of number in c++ 
Cpp :: ifstream 
Cpp :: time complexity of best sort algorithm 
Cpp :: DSA 2. Complexity Analysis Google drive Educative excellent courses!!!! [Educative.io] Competitive Programming in C++ The Keys to Success 
Cpp :: first and last digit of a number in c++ 
Cpp :: sum of n natural numbers 
Cpp :: options select from array 
Cpp :: C++ Taking Multiple Inputs 
Cpp :: hashset in cpp 
Cpp :: c++ power of two 
Cpp :: c++ function overloading 
Cpp :: replace a char in string c++ at a specific index 
Cpp :: auto in cpp 
Cpp :: cpprestsdk send file 
Cpp :: c++ void poiinter 
Cpp :: Array declaration by specifying the size and initializing elements in C++ 
Cpp :: c++ file handiling 
Cpp :: warning: base will be initialized after 
Cpp :: c++ throe 
Cpp :: c++ to mips converter online 
Cpp :: how to find common divisors of two numbers in cpp 
Cpp :: CodeChef Starters 30 Division 4 (Rated) Swapping Chefs Way 
Cpp :: vector with initial size 
Cpp :: integrate sinx 
Cpp :: C++ Converting Celsius to Kelvin 
Cpp :: sort using comparator anonymous function c++ 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =