您的位置:首页 > 编程语言 > C语言/C++

c++primer 第九章

2010-06-13 17:20 302 查看
 

#include  "item_base.h"

#include  "test.h"

 

int main(void)

{

    char* words[]={"hello","world","joyzone","linux","windows"};

 

    vector<string>list(words,words+sizeof(words)/sizeof(char*));

    copy(list.begin(),list.end(),ostream_iterator<string>(cout,"/n"));

    return 0;

}

 

 

 

 

 

int main(void)

{

    string temp="aasasf";

 

    int n =strlen(temp.c_str());

    cout<<temp.size()<<"     "<<n<<endl;

    return 0;

}

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息