ESP-IDF:字符和整形二维指针测试
/字符和整形二维指针测试/
void print19a(void ** cp) {
cout<<"test char ** "<<endl;
cout<<"cp= "<<*((char **)cp)<<endl;
char *s =*((char **)cp);
cout<<"cp= "<<s<<endl;
}
void print19b(void ** ip) {
cout<<"test int ** "<<endl;
cout<<"ip= "<<**((int **)ip)<<endl;
int i = **((int **)ip);
cout<<"ip= "<<i<<endl;
}
void test19() {
char * a =“18”;
void** p =(void**)&a;
int i = 88;
int * b = &i;
void** bp = (void**)&b;
cout<<"--------二维指针测试--------"<<endl;
print19a(p);
print19b(bp);
}
extern “C” void app_main(void)
{
test19();
}