Time:09-25
CodePudding user response:
variables can define an address, the address to where the data type,
void *!Need to use what data type is strong turn
# include using namespace std; The template & lt; The class T> T add (T& Left, T& Right) {Return left + right; } Int main () {Int a=3, b=2; Double c=5.0, d=1.0; Printf (" % d \ n ", add (a, b)); Printf (" % lf \ n ", add (c, d)); }
#include Int main () {Int a=5; Double b=7; Void * p=& amp; a; Printf (" % d ", * (int *) p);//the cursor cast to type int * to visit P=& amp; b; Printf (" % f ", * * (double) p); return 0; }
Page link:https//www.codepudding.com/Backend/30595.html