ch10_1.cpp

来自「本文档是(作者:钱能)《C++程序设计教程》系列的部分辅助代码。 选题编辑:张」· C++ 代码 · 共 22 行

CPP
22
字号
//**********************
//**    ch10_1.cpp    **
//**********************

#include <iostream.h>

struct Weather
{
  double temp;    //温度
  double wind;    //风力
};

void main()
{
  Weather today;
  today.temp=30.5;    //作为左值使用
  today.wind=10.1;

  cout <<"Temp=" <<today.temp <<endl;  //作为右值使用
  cout <<"Wind=" <<today.wind <<endl;
}

⌨️ 快捷键说明

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