两段代码的区别

发表于:2007-05-26来源:作者:点击数: 标签:
关于输入输出流中的函数执行

#include <iostream.h>

int nl()
{
 cout << endl;
 return  10;
}


int main(int argc, char* argv[])
{

 cout << " newlines " << nl()  << "between" << nl() << "each" << nl() << "word" << endl;

 return 0;
}

#include <iostream.h>

int nl()
{
 cout << endl;
 return  10;
}


int main(int argc, char* argv[])
{

 cout << " newlines " << nl();

cout << "between" << nl();

cout  << "each" << nl();

cout  << "word" << endl;

 return 0;
}

原文转自:http://www.ltesting.net

评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)