问题 填空题

重载的流运算符函数应该被定义为类的______函数。

答案

参考答案:友元

解析: C++流的输入运算符“>>”和输出运算符“<<”只能作为非成员函数重载,即应重载为友元函数。

阅读理解

阅读下面短文,然后根据短文内容回答问题。

       Jan Mela isn't like most kids .Two years ago , he lost an arm and a leg .But that didn't stop him .

       On Saturday ,the 15-year-old boy from Poland(波兰)walked to the North Pole(北极)without

any help.

       "If I can do it ,other people can do great things ,too ," Mela said before he went.

       Polish newspapers said Mela is the youngest person and the first handicapped(残疾的)person to

walk to the North Pole.

       How did Mela lose an arm and a leg ? He had an electrical(电的)accident .Now , he walks with

the help of a 62,000-yuan man-made leg.

       After the accident , Mela felt sad for himself . But he didn't lose hope .One day ,he met Marek

Kaminski ,a Polish explorer . Eight years ago ,Kaminski went to the North Pole and the South Pole in

the same year .Mela wanted to see the North Pole ,too . So Mela asked Kaminski if they could go

together next time .Kaminski said yes!

       It took Mela 21 days to get to the North Pole .The last three or four days were really hard because

of bad weather .But Mela kept going .

       "I didn't think we would make it ," he said , "Then ,things got better."

1. What happened to Mela two years ago?

                                                                                                    

2. Why did Polish newspapers report the travel to the North Pole?

                                                                                                    

3. How does Mela walk after the accident?

                                                                                                    

4. Where did Kaminski go eight years ago?

                                                                                                    

5. Why did Mela make the travel?

                                                                                                      

单项选择题