This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//========== | |
// 数値から文字列への変換 | |
// 1, Compile | |
// g++ -std=c++17 -Wall -Wextra main.cpp | |
// 2, Run | |
// ./a.out | |
#include <math.h> | |
#include <stdio.h> | |
#include <string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//========== | |
// 任意個数の要素をコンテナに追加 | |
// 1, Compile | |
// g++ -std=c++17 -Wall -Wextra main.cpp | |
// 2, Run | |
// ./a.out | |
#include <math.h> | |
#include <stdio.h> | |
#include <vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Mtx3xX.h" | |
bool Mtx3x3::operator==(const Mtx3x3 &rhs) const{ | |
for(size_t r=0; r<size; r++){ | |
for(size_t c=0; c<size; c++){ | |
if(mtx[r][c] != rhs.mtx[r][c]) return false; | |
} | |
} | |
return true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Vec2.h" | |
Vec2 Vec2::operator+(const Vec2 &vec) const { | |
return Vec2(x + vec.x, y + vec.y); | |
} | |
Vec2 &Vec2::operator+=(const Vec2 &vec) { | |
x += vec.x; | |
y += vec.y; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//========== | |
// テンプレート(関数テンプレート) | |
// 1, Compile | |
// g++ -std=c++17 -Wall -Wextra main.cpp | |
// 2, Run | |
// ./a.out | |
#include <math.h> | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//========== | |
// 演算子オーバーロード | |
// 1, Compile | |
// g++ -std=c++17 -Wall -Wextra main.cpp | |
// 2, Run | |
// ./a.out | |
#include <math.h> | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//========== | |
// IPv4データ型 | |
// 1, Compile | |
// g++ -std=c++17 -Wall -Wextra main.cpp | |
// 2, Run | |
// ./a.out | |
#include <math.h> | |
#include <sstream> | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//========== | |
// ローマ数字に変換 | |
// 1, Compile | |
// g++ -std=c++17 -Wall -Wextra main.cpp | |
// 2, Run | |
// ./a.out | |
#include <math.h> | |
#include <stdio.h> | |
#include <string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//========== | |
// 過剰数か判定する | |
// 1, Compile | |
// g++ -std=c++17 -Wall -Wextra main.cpp | |
// 2, Run | |
// ./a.out | |
#include <math.h> | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//========== | |
// HowTo C++ | |
// 1, Compile | |
// g++ -std=c++17 -Wall -Wextra main.cpp | |
// 2, Run | |
// ./a.out | |
#include <math.h> | |
#include <stdio.h> |
NewerOlder