?? inline.cpp
字號:
#include <iostream.h>
#include <string.h>
class movie
{
public:
char name[64];
char first_star[64];
char second_star[64];
void show_movie(void)
{
cout << "Movie name: " << name << endl;
cout << "Starring: " << first_star << " and " << second_star << endl << endl;
}
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 << "The last two movies I've watched are: " << fugitive.name << " and " << sleepless.name << endl;
cout << "I thought " << fugitive.first_star << " was great!" << endl;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -