Home >Backend Development >C#.Net Tutorial >Using null pointers to simplify code examples in C/C++
reduce the use of stack space memory and reduce the calculation overhead during runtime!
# include iostream> #include string> using namespacestd; void print_char( char* array[]); //函数原形声明 void main ( void ) { char * test[]={"abc","cde","fgh",NULL}; //这里添加一个NULL,表示不指向任何地址,值为0 print_char(test); cin .get(); } void print_char( char * array[]) { while (*array!=NULL) { cout } }
The above is the detailed content of Using null pointers to simplify code examples in C/C++. For more information, please follow other related articles on the PHP Chinese website!