Reverse

Reverse

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

基本介紹

  • 外文名:Reverse
  • 英音:[ri'və:s]
  • 美音:[rɪ'vɝs]
  • 形容詞意:顛倒的
字元次序,英文單詞,

字元次序

語法Reverse ( string )
參數string:要顛倒字元次序的字元串返回值String。函式執行成功時返回顛倒字元次序後的字元串,如果發生錯誤,那么返回空字元串("")。用法Reverse()函式將一個字元串中最後一個字元放置到另一個字元串的第一個字元位置、倒數第二個字元放置在另一個字元串的第二個字元位置,以此類推。
// reverse algorithm example
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main () {
vector<int> myvector;
vector<int>::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.
倒開汽車直到你開出這個胡同。

熱門詞條

聯絡我們