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

📄 testprog.cpp

📁 data+structures+using+c的源码
💻 CPP
字号:
//Test Program: this pointer

#include <iostream>
#include <string>
#include "personType.h"

using namespace std;

int main()
{
	personType student1("Angela", "Clodfelter");		  //Line 1

	personType student2;								  //Line 2

	personType student3;								  //Line 3

	cout<<"Line 4 -- Student 1: ";						  //Line 4
	student1.print();									  //Line 5
	cout<<endl;											  //Line 6

	student2.setFirstName("Shelly").setLastName("Malik"); //Line 7

	cout<<"Line 8 -- Student 2: ";						  //Line 8
	student2.print();									  //Line 9
	cout<<endl;											  //Line 10

	student3.setFirstName("Chelsea");					  //Line 11

	cout<<"Line 12 -- Student 3: ";						  //Line 12
	student3.print();									  //Line 13
	cout<<endl;											  //Line 14

	student3.setLastName("Tomek");						  //Line 15

	cout<<"Line 16 -- Student 3: ";						  //Line 16
	student3.print();									  //Line 17
	cout<<endl;											  //Line 18

	return 0;
}

⌨️ 快捷键说明

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