cpp29.cpp

来自「C++参考书」· C++ 代码 · 共 39 行

CPP
39
字号

// Coded by plusir -- Dec.28.2002.
// Standard C++ Bible -- (P199-6-29)

#include <iostream>
using namespace std ;

struct Bigone
{
	int serno ;
	char text[1000] ;
} ;

void slowFunc( Bigone ) ;
void fastFunc( Bigone & ) ;

int main()
{
	static Bigone bo = { 123, "This is a BIG structure" } ;

	slowFunc( bo ) ;

	fastFunc( bo ) ;

	return 0 ;
}

void slowFunc( Bigone p1 )
{
	cout << p1.serno << endl ;
	cout << p1.text << endl ;
}

void fastFunc( Bigone &p1 )
{
	cout << p1.serno << endl ;
	cout << p1.text << endl ;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?