zoukankan      html  css  js  c++  java
  • 函数跳过输入流中的字符

     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 ch[20];
     7     cin.get(ch,20,'/');
     8     cout<<"The first part is:"<<ch<<endl;
     9     cin.get(ch,20,'/');
    10     cout<<"The second part is:"<<ch<<endl;
    11     return 0;
    12 }
  • 相关阅读:
    条件
    循环
    列表
    字典
    集合
    公共操作
    函数-2
    函数-1
    函数加强
    文件操作
  • 原文地址:https://www.cnblogs.com/borter/p/9405560.html
Copyright © 2011-2022 走看看