//程序作者:管寧
//站點:www.cndev-lab.com
//所有稿件均有版權,如要轉載,請務必聞名出處和作者
#include <iostream>
#include <string>
using namespace std;
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<<*array++<<endl;
}
}
新聞熱點
疑難解答