usephras.cpp
来自「Since the field of object oriented progr」· C++ 代码 · 共 29 行
CPP
29 行
// Chapter 6 - Program 14 - USEPHRAS.CPP
#include <iostream.h>
#include "phrase.h"
int main()
{
phrase my_text;
cout << "The phrase is ---> " << my_text.get_phrase() << "\n";
my_text.set_noun("baseball");
cout << "The phrase is ---> " << my_text.get_phrase() << "\n";
my_text.set_verb("Throw");
cout << "The phrase is ---> " << my_text.get_phrase() << "\n";
my_text.set_noun("game");
cout << "The phrase is ---> " << my_text.get_phrase() << "\n";
return 0;
}
// Result of execution
//
// The phrase is ---> the
// The phrase is ---> the baseball
// The phrase is ---> Throw the baseball
// The phrase is ---> Throw the game
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?