快好知 kuaihz订阅看过栏目

 

Reverse的意思是颠倒,翻转,也有相反的;反向,背面的,反面的的的意思。

字符次序

语法Reverse ( string )

参数string:要颠倒字符次序的字符串返回值String。函数执行成功时返回颠倒字符次序后的字符串,如果发生错误,那么返回空字符串("")。用法Reverse()函数将一个字符串中最后一个字符放置到另一个字符串的第一个字符位置、倒数第二个字符放置在另一个字符串的第二个字符位置,以此类推。

EXAMPLE:

// reverse algorithm example

#include

#include

#include

using namespace std;

int main () {

vector myvector;

vector::iterator it;

// set some values:

for (int i=1; i<10; ++i) myvector.push_back(i); // 1 2 3 4 5 6 7 8 9

reverse(myvector.begin(),myvector.end()); // 9 8 7 6 5 4 3 2 1

// print out content:

cout << "myvector contains:";

for (it=myvector.begin(); it!=myvector.end(); ++it)

cout << " " << *it;

cout << endl;

return 0;

}

Output:

myvector contains: 9 8 7 6 5 4 3 2 1

英文单词

英音:[ri'v :s]

美音:[r 'v s]

形容词 a.

1. 颠倒的

in reverse order

次序颠倒

2. 相反的;反向的

This time it came in the reverse direction.

这一次它是从相反的方向来的。

3. 背面的,反面的

She then looked at the reverse side of the coin.

接着她看了看钱币的反面。

及物动词 vt.

1. 颠倒,翻转

Their positions are now reversed.

他们的地位现在颠倒过来了。

His coat can be reversed when it begins to rain.

他的外衣下雨时能翻过来穿。

2. 使倒退,使倒转;使反向

He reversed his car into the garage.

他把车子倒开进车库。

3. 彻底改变

She reversed her views.

她彻底改变了看法。

4. 【律】推翻;撤销

The court reversed its decision.

法庭撤销了原来的判决。

不及物动词 vi.

1. 倒退,倒转;反向

Alternating current reverses from negative to positive about 60 times a second.

交流电由负到正一秒钟大约变换六十次。

名词 n.

1. 相反[the S][(+of)]

They did the reverse of what the teacher told them to do.

他们做的与老师的要求相反。

The truth is just the reverse.

真实情况恰好相反。

2. 背面,反面[the S]

The reverse of the coin was stamped with an eagle.

硬币的反面压印的是一只鹰。

3. 挫折;失败;倒霉[C]

His career met with many reverses.

他的事业遭到许多挫折。

4. 倒退,倒转;反向[U][C]

Drive the automobile in reverse until you get out of the alley.

倒开汽车直到你开出这个胡同。

投稿
非常不爽,删了吧! 相关词条:文化 语言文字 词语