懵懂的菜鸟

Stay hungry,Stay foolish.

导航

2017年9月26日 #

完美世界 字符串倒置输出

摘要: 1 #include 2 using namespace std; 3 /* 4 字符串倒置输出: 5 输入: 6 123 456 789 00 10 7 输出: 8 10 00 789 456 123 9 */ 10 int main(){ 11 string str; 12 getline(cin,str); 13 int count=... 阅读全文

posted @ 2017-09-26 21:19 懵懂的菜鸟 阅读(190) 评论(0) 推荐(0)

cin和gitchar的区别

摘要: cin是iostream(输入输出类) 类下的istream(输入类)类的对象,作用是顺序输入字符串。cin.get()是cin的方法。cin.get()是C++面向对象的操作,getchar()是C语言面向过程的操作。cin的返回值是istream的引用,getchar()的返回是int。关于ci 阅读全文

posted @ 2017-09-26 17:15 懵懂的菜鸟 阅读(555) 评论(0) 推荐(0)