Last active
December 20, 2015 16:58
-
-
Save toya33/6164897 to your computer and use it in GitHub Desktop.
vector<int>とvector<boolean>を要素数1で宣言した場合にそれぞれに必要なサイズを表示する
This file contains hidden or 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 <StandardCplusplus.h> | |
#include <system_configuration.h> | |
#include <unwind-cxx.h> | |
#include <utility.h> | |
#include <vector> | |
void setup(){ | |
Serial.begin(9600); | |
} | |
void loop(){ | |
std::vector<boolean> vector_of_boolean(1); | |
std::vector<int> vector_of_int(1); | |
Serial.print("boolean size:"); | |
Serial.println(sizeof(vector_of_boolean)); | |
Serial.print("int size:"); | |
Serial.println(sizeof(vector_of_int)); | |
delay(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
実行結果
boolean size:7
int size:7