c語(yǔ)言reverse函數(shù)怎么使用 C語(yǔ)言:函數(shù)reverse()是什么?
C語(yǔ)言:函數(shù)reverse()是什么?標(biāo)準(zhǔn)C中沒(méi)有reverse()函數(shù),這是一個(gè)新的函數(shù)模板< class bidirectional iterator>;C中的void reverse(b
C語(yǔ)言:函數(shù)reverse()是什么?
標(biāo)準(zhǔn)C中沒(méi)有reverse()函數(shù),這是一個(gè)新的函數(shù)模板< class bidirectional iterator>;C中的void reverse(bidirectional iterator)First,bidirectional iterator(bidirectional iterator)Last)需要引用頭文件#include<algorithm> namespace:STD
,這是函數(shù)。Void表示函數(shù)沒(méi)有返回類型,即沒(méi)有返回值。括號(hào)中的參數(shù)被傳遞給這個(gè)函數(shù)以實(shí)現(xiàn)一些邏輯函數(shù)。相反,calstring是函數(shù)名??纯催@兩個(gè)名字,似乎這兩個(gè)函數(shù)的功能是字符串反轉(zhuǎn)和計(jì)算字符串的數(shù)目。第二個(gè)功能有點(diǎn)不尋常,呵呵。