0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

c++のライブラリ関数備忘録

Posted at

c++ライブラリ関数備忘録

-<iostream>
 c++のコンソール入出力1の際に使用する演算子、>> <<を使用するためのライブラリ。>>が入力を表し、<<が出力を表す。

例えば"Hello World of C++."と出力したい時には

:Hello World of c++
# include <iostream>

int main(){
   std::cout<< "Hello World of c++." << std::end;
   return 0;
}
 

と入力するstd::をスコープ解決演算子2と呼ぶ。

  • <cstdio>

    c形式の入出力関数を扱うライブラリのヘッダ。fopen,fclose,fgetsなどが使えるようになる。
  • <cstdlib>

    cの標準ライブラリでの<stdlib.h>の機能を有するヘッダ。malloc,freeなどが使えるようになる。
  • <ctime>

    cの標準ライブラリでの<time.h>の機能を有するヘッダ。clock,timeなどの機能を使えるようになる。
  • <fstream>

    入出力ライブラリの一部のヘッダ。
  • <sstream>

    入出力ライブラリの一部のヘッダ。
  • <algorithm>

    要素の範囲に対して、検索やソート、操作を行う関数を定義するライブラリ。

    指定範囲に対してデータの変更を行わない操作とデータの変更を行う操作がある。データの変更を行う操作はソート操作、ヒープ操作、順列操作などがある。
  • <vector>

    vector型の変数を扱うことができるようになるヘッダ。vector型の変数は、サイズが可変長である動的配列で、c++の中でも高速でメモリ効率がよく単純なクラスである。より詳しくは[次のリンク先][link-1]。
  • <cstring>

    c標準ライブラリでの<string.h>の機能を有するヘッダ。おもに文字列に対する操作の関数が入っている。strcpy,strcat,strcmp,strlenなどが使えるようになる。
  • <cmath>

    数学に関する関数やマクロの機能を有するヘッダ。
  • <iomanip>

    入出力に使用するフォーマットやマニピュレータ3の機能を有するヘッダ。
  1. iostreamを使う値の中でも特別な機能を有するもの詳しくはhttps://docs.oracle.com/cd/E19957-01/805-7889/6j7duaij7/index.html
    [link-1]:http://vivi.dyndns.org/tech/cpp/vector.html
    [link-2]:

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?