📄 pr06001.cpp
字号:
////////////////////////////////////////
// File Name: pr06001.cpp
////////////////////////////////////////
#include <iostream>
////////////////////////////////////////
// The main() function.
////////////////////////////////////////
int main()
{
// Intrinsic type variables.
char c = 'A';
int i = 123;
long l = 54321;
float f = 3.45;
// Pointers.
char* cp; // to char
int* ip; // to int
long* lp; // to long
float* fp; // to float
// Assign variable addresses to pointers.
cp = &c;
ip = &i;
lp = &l;
fp = &f;
// Reference the variables through the pointers.
std::cout << *cp << std::endl;
std::cout << *ip << std::endl;
std::cout << *lp << std::endl;
std::cout << *fp << std::endl;
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -