[C++] c++ 字符数组 →→→→→进入此内容的聊天室

来自 , 2021-02-24, 写在 C++, 查看 103 次.
URL http://www.code666.cn/view/e8dfff46
  1. // 字符数组
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main() {
  6.         char buffer[80] = { '\0' };
  7.         cout << "Enter the string: ";
  8.         cin.get(buffer, 79); // get up to 79 or newline
  9.         cout << "Here's the buffer: " << buffer << endl;
  10.         return 0;
  11. }
  12.  

回复 "c++ 字符数组"

这儿你可以回复上面这条便签

captcha