⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vc15main.cpp

📁 c#设计模式WithCla
💻 CPP
字号:
//This sample main program may be used to test Visual C++ code generation scripts.
//In With Class load cppcar.omt.  Run the scripts vc15head.sct and vc15func.sct
//with a QuickWin project. Add to the project vc15main.cpp, vehicle.cpp, 
//car.cpp, motor.cpp, passengr.cpp, tire.cpp, and clllrphn.cpp.
//Comments and suggestions are solicited Richard Felsinger, RCF Associates
//960 Scottland Dr, Mt Pleasant, SC 29464 tele 803-881-3648 71162.755@compuserve.com

#include <iostream.h>
#include "stdafx.h"
#include "car.h"

int main ()
{ 
  Car car1;                     //Creates car1 object without a passenger
  cin >> car1;                  //Invokes insertion operator>>                                  
  cout << car1;                 //Invokes extraction operator<<
  
  Car car2 (55, 10);                //Invokes constructor with arguments
    
  car1 = car2;                  //Invokes assignment operator=
  if (car1 == car2) cout << "Cars are equal.";//Invokes equality operator==
  else cout << "Cars are not equal.";

  return 0;
} 

⌨️ 快捷键说明

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