用字符数组存放一个字符串

Posted borter

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了用字符数组存放一个字符串相关的知识,希望对你有一定的参考价值。

1 #include <iostream>
2 
3 /* run this program using the console pauser or add your own getch, system("pause") or input loop */
4 using namespace std;
5 int main(int argc, char** argv) {
6     char str[]="I love CHINA!";
7     cout <<str<<endl;
8     return 0;
9 }

 

以上是关于用字符数组存放一个字符串的主要内容,如果未能解决你的问题,请参考以下文章