topical media & game development
basic-program-code-10-Ex10-01-Ex10-01.c
? /
basic-program-code-10-Ex10-01-Ex10-01.c
// 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;
}
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.