摘要:
cout输出流的执行顺序下面是IBM的一道笔试题#include <iostream> using namespace std; int fun( ) { cout << "f" ; return 1; } int main() { int i = 1; // cout << i++ << i++ << i++ << endl; cout << "m" << fun() << fun() << fun() << endl; 阅读全文
posted @ 2012-03-31 11:10
Penelope
阅读(567)
评论(0)
推荐(0)
摘要:
cin 、cout 基本说明: cin代表标准输入设备,使用提取运算符 ">>" 从设备键盘取得数据,送到输入流对象cin中,然后送到内存。 cin是输入流,cout是输出流,重载了">>"、"<<"运算符,包含在头文件<iostream>中。 先把要输出的东西存入缓冲区,再输出,导致效率降低,cin是自动判断你的变量类型,比如一个char数据只能用默认的char方法取数据。scanf 、printf基本说明: scanf是格式化输入,printf是格式化输出,包含在头文件<std 阅读全文
posted @ 2012-03-31 10:52
Penelope
阅读(1421)
评论(0)
推荐(1)

浙公网安备 33010602011771号