找考题网-背景图
未分类题

下面程序有注释的语句中,错误的语句是( )。 #include <iostream> using namespace std; class A{ int a; public: void show A(){cout<<'this is A!';} }; class B:public A{ int b; public: void show B(){cout<< 'this is B!';} }; void main(){ A ia,*piA; B ib,*piB; piA=ia; //第一个测试语句 piA=&ib; //第二个测试语句 piA->showA(); //第三个测试语句 piA->showB(); //第四个测试语句 }
D.第四个测试语句

A.第一个测试语句
B.第二个测试语句
C.第三个测试语句

【参考答案】

A
解析:ia应进行取地址操作。
热门试题

未分类题Auctions are public sales of goods, conducted by an officially approved auctioneer. He asks the crowd assembled in the auction room to make offers, or 'bids', for the various items on salE.He encourages buyers to bid higher figures, and finally names the highest bidder as the buyer of the goods. This is called 'knocking down' the goods, for the bidding ends when the auctioneer bangs a small hammer on a table at which he stands. This is often set on a raised platform. called a rostrum.The ancient Romans probably invented sales by auction, and the English word comes from the Latin auctio, meaning 'increase'. The Romans usually sold in this way the spoils taken in war; these sales were called sub basra, meaning 'under the spear', a spear being stuck in the ground as a signal for a crowd to gather. In England in the eighteenth and nineteenth centuries goods were often sold 'by the candle', a short candle was lit by the auctioneer, and bids could be made while it stayed alight.Practically all goods whose qualities vary are sold by auction. Among these are coffee, hides, skins, wool, tea, cocoa, furs, spices, fruit and vegetables and wines. Auction sales are also usual for land and property, antique furniture, pictures, rare books, old china and similar works of art. The auction rooms at Christie's and Sotheby's in London and New York are world-famous.An auction is usually advertised beforehand with full particulars of the articles to be sold and where and when they can be viewed by prospective buyers. If the advertisement cannot give full details, catalogues are printed, and each group of goods to be sold together, called a 'lot', is usually given a number. The auctioneer need not begin with Lot 1 and continue in numerical order, he may wait until he registers the fact that certain dealers are in the room and then produce the lots they are likely to be interested in. The auctioneer's services are paid for in the form. of a percentage of the price the goods are sold for. The auctioneer therefore has a direct interest in pushing up the bidding as high as possiblE.The auctioneer must know fairly accurately the current market values of the goods he is selling, and he should be acquainted with regular buyers of such goods. He will not waste time by starting the bidding too low. He will also play on the rivalries among his buyers and succeed in getting a high price by encouraging two business competitors to bid against each other. It is largely on his advice that a seller will fix a 'reserve' price, that is, a price below which the goods cannot be solD.Even the best auctioneers, however, find it difficult to stop a 'knockout', whereby dealers illegally arrange beforehand not to bid against each other, but nominate one of themselves as the only bidder, in the hope of buying goods at extremely low prices. If such a 'knockout' comes off, the real auction sale takes place privately afterwards among the dealers.A candle used to burn at auction sales ______.A.because they took place at nightB.as a signal for the crowd to gatherC.to keep the auctioneer warmD.to limit the time when offers could be made

A.B.
C.
D.
E.
A
F.
A.because
G.as
H.to
I.to