未だ来ぬ未来

ブログ

tuple

c++の多次元のtuple(読み方: タプル)の扱いで苦労したので記載する。今回はtupleのvectorで多次元タプルを使用。以下プログラム。 #include <iostream> #include<vector> #include <string> #include <tuple> using namespace std; int main(void){ int n=5; int x[]={1,2,3,4,5}; int y[]={10</tuple></string></vector></iostream>…

'auto' type specifier is a C++11 extension [-Wc++11-extensions]のエラー

以下のコンパイルエラーの対処法についてerror: use of undeclared identifier 'tuple' 'auto' type specifier is a C++11 extension [-Wc++11-extensions][背景] auto型やtupleをプログラム中で使用するときにコンパイルエラーが生じた。 コンパイルは以下…

batファイルを使って任意の名前のファイルとフォルダを作成する

背景 社内のレポート作成手順がめんどくさく、フォルダを作成し既にあるフォーマットファイルをその中にコピーして、そのファイル名をフォルダと同一にするという作業が必要だった。 めんどくさいのでフォルダ・ファイルの自動生成バッチを作成。 想定ファイ…

git memo

備忘録としてgitの使い方について記す。 git init ローカルに新規gitリポジトリ作成。つまり.gitディレクトリを作成する。 git status 現在のgitの状態を表示する。 git add a.c a.cファイルをローカルのリポジトリに追加する。gitの対象となるイメージ。 gi…

MACのルートディレクトリ配下のファイル

MAC book のディレクトリ構成がどうなってるのか調べた。 ディレクトリ 正式名称 説明 /Applications 全ユーザのアプリケーションを管理 /Users users 各ユーザのホームディレクトリを管理 /Library 全ユーザのアプリケーションの設定を管理 /Volumes 外部記…

M1 MACの開発環境セットアップメモ

homebrew sudo mkdir /opt/homebrew chown ${USER}$:admin homebrew curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C /opt/homebrew パスを通す export PATH=/opt/homebrew/bin:$PATH dev.classmethod.jp アンインストール …

pythonのpipについて

python import package-name この時,pipを更新してからパッケージをインストールする必要がある. pipの更新 pip -m pip install --upgrade pip パッケージのインストール(package-name=任意のパッケージ名) pip install package-name インストールしたパッ…