问题 单项选择题

设有以下类的定义:

class Ex

int x;

public:

void setx(int t=0);

;

若在类外定义成员函数setx( ),以下定义形式中正确的是

A.void setx(int t)…

B.void Ex::setx(int t)…

C.Ex::void setx(int t)…

D.void Ex::setx( )…

答案

参考答案:B

解析: 选项A可以排除,原因是类的成员函数的定义必须用域作用符::进行限定;选项C的限定位置不对,函数的类型应在最前面。根据上下文可以指导,setx为单参成员函数,在定义时也必须指定参数,因此选项D也可以排除,正确答案为B。

综合
单项选择题

People don’t want to buy information online. Why Because they don’t have to. No more than that because they’re used to not paying for it. That’s the conventional wisdom. Slate, Microsoft’s online politics-and-culture magazine, is an oft-cited example of the failed attempts to charge a fee for access to content. So far, for most publishers, it hasn’t worked.

But nothing on the Web is a done deal. In September graphics-soft-ware powerhouse Adobe announced new applications that integrate commerce into downloading books and articles online, with Simon & Schuster, Barnes and Noble, and Salon. corn among its high-profile partners. Some analysts put the market for digitized publishing at more than $100 billion. Of course, if the Internet can generate that kind of money—some might say almost any kind of money—people want in. And this couldn’t come at a better time. Newspaper and magazine writers in particular are increasingly frustrated by their publishers, which post their writings online but frequently don’t pay them extra.

So here’s the good news: Fathrain. com, the third biggest book-seller on the Net—after Amazon. com and Barnesandnoble. corn—is now doing just what the publishing industry that made it a success fears., it’s offering a secure way to pay for downloadable manuscripts online. Fatbrain calls it offshoot eMatter. With it, the company’s executives have the radical notion of ousting publishers from the book-selling business altogether by giving writers 50% of each and every sale (To reel in authors, eMatter is running a 100% royalty promotion until the end of the year. ) Suggested prices to consumers range from a minimum $ 2 to $ 20, depending on the size of the book to download.

"This will change publishing forever!" Chris MaeAskill, co-founder and chief executive of Fatbrain, declares with the bravado of an interior decorator. "With eBay, anybody could sell antiques. Now anybody can be published. "

There’s been no shortage of authors wanting in. Within a few weeks, according to the company, some 2,000 writers signed on to publish their works. Some of this is technical stuff—Fatbrain got where it is by specializing in technical books—but there are some well-known writers like Catherine Lanigan, author of Romancing the Stone, who has put her out-of-print books and a new novella on the site. Another popular draw is Richard Bach, who agreed to post a 23-page short story to the site.

Not everyone thinks downloadable documents are the biggest thing in publishing since Oprah’s Book Club. "I think it will appeal to sellers more than buyers," says Michael May, a digitalcommerce analyst at Jupiter Communications, which released a report that cast doubt on the market’s potential. "A lot of people are going to publish gibberish. The challenge is to ensure the quality of the work. "

Blaine Mathieu, an analyst at Gartner Group’s Dataquest, says, "Most people who want digital content want it immediately, I don’t know if this model would satisfy their immediate need. Even authors may not find that Web distribution of their works is going to bring them a pot of gold. For one thing, it could undermine sales rather than enhance them. For another, anybody could e-mail downloaded copies of manuscripts around town or around the world over the Net without the writer’s ever seeing a proverbial dime. " Softlock. com, Authentica and Fatbrain are trying to head this problem off by developing encryption padlocks that would allow only one hard drive to receive and print the manuscripts. For now, the problem persists.

Which of the following is NOT a reason for some people’s belief that e-publishers will not succeed ().

A.Readers often want immediate digital content.

B.Authors usually do not believe they’ll earn money on Net.

C.The quality of the books on Net is hard to manage.

D.Books that sell well usually do not turn to Net.