《C/C++程序员实用大全》配套代码,适用初学C++的人员。
源代码在线查看: inline.cpp
#include
#include
class movie
{
public:
char name[64];
char first_star[64];
char second_star[64];
void show_movie(void)
{
cout cout }
void initialize(char *movie_name, char *first, char *second)
{
strcpy(name, movie_name);
strcpy(first_star, first);
strcpy(second_star, second);
}
};
void main(void)
{
movie fugitive, sleepless;
fugitive.initialize("The Fugitive", "Harrison Ford", "Tommy Lee Jones");
sleepless.initialize("Sleepless in Seattle", "Tom Hanks", "Meg Ryan");
cout
cout }