共用方式為


<iomanip> get_time

使用所需的格式,從資料流擷取時間值。 傳回在參數的值為時的結構。

template<class Elem>
    T10 put_time(
        struct tm *_Tptr, 
        const Elem *_Fmt
    );

參數

  • _Tptr
    以時間結構形式的時間。

  • _Fmt
    將使用的所需格式取得時間值。

屬性值/傳回值

函式的傳回值為 str資料流。

備註

操作工具傳回,,當從資料流擷取 str, formatted input function 的行為稱為地區設定之 facet time_get 成員函式 get 與 str,使用 tptr 表示時間結構和 fmt 表示 null 結尾格式字串開頭的物件。 如果成功,階段呼叫預存結構值與所有擷取的時間欄位。 操作工具然後傳回 str。

需求

標頭 <iomanip>

命名空間: std

請參閱

參考

<iomanip>

iostream 程式設計

iostreams 慣例