cpp16.cpp

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

CPP
29
字号

// Coded by plusir -- Dec.28.2002.
// Standard C++ Bible -- (P173-6-16)

#include <iostream>
#include <cctype>
using namespace std ;

void showAllUppers( char *const ) ;

int main()
{
	char hb[] = "happy birthday" ;
	showAllUppers( hb ) ;

	return 0 ;
}

void showAllUppers( char *const str )
{
	int i = 0 ;

	while ( *( str + i ) ) {
		*( str + i ) = toupper( *( str + i ) ) ;
		++i ;
	}
	cout << str << endl ;
}

⌨️ 快捷键说明

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