📄 cpp01.cpp
字号:
// Coded by plusir -- Dec.28.2002.
// Standard C++ Bible -- (P148-6-1)
#include <iostream>
using namespace std ;
void function( void ) { cout << "hello, world!" << endl ; }
int main()
{
char c = 'A' ;
int i = 123 ;
long l = 54321 ;
double d = 3.45 ;
char* cp ;
int* ip ;
long* lp ;
double* dp ;
cp = &c ;
ip = &i ;
lp = &l ;
dp = &d ;
cout << *cp << endl ;
cout << *ip << endl ;
cout << *lp << endl ;
cout << *dp << endl ;
cout << sizeof( cp ) << endl ;
cout << sizeof( ip ) << endl ;
cout << sizeof( lp ) << endl ;
cout << sizeof( dp ) << endl ;
void( *ifn )( void ) = function ;
cout << sizeof ( ifn ) << endl ;
( *ifn )() ;
return 0 ;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -