ex10_01.cpp
来自「Visual C++ 2005的源代码」· C++ 代码 · 共 23 行
CPP
23 行
// Ex10_01.cpp : Including debug code in a program
#include <iostream>
using namespace std;
#include "Name.h"
int main(int argc, char* argv[])
{
Name myName("Ivor", "Horton"); // Try a single object
// Retrieve and store the name in a local char array
char theName[12];
cout << "\nThe name is " << myName.getName(theName);
// Store the name in an array in the free store
char* pName = new char[myName.getNameLength()+1];
cout << "\nThe name is " << myName.getName(pName);
cout << endl;
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?