亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

C/C++中利用空指針簡化代碼,提高效率

 更新時間:2006年09月28日 00:00:00   作者:  

這里的寫法,可以避免使用 for 循環(huán),減少??臻g內(nèi)存的使用和減少運(yùn)行時的計(jì)算開銷!

#include <iostream>   
#include <string>   
using namespace std;   

void print_char(char* array[]);//函數(shù)原形聲明   

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++<    }   

相關(guān)文章

最新評論