Created
January 25, 2016 10:03
-
-
Save y-fedorov/95f67dca95461060aea1 to your computer and use it in GitHub Desktop.
Test example - size of structure.
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
// | |
// main.cpp | |
// | |
// Created by Yaroslav Fedorov on 12/01/16. | |
// Copyright © 2016 Yaroslav Fedorov. All rights reserved. | |
// | |
#include <iostream> | |
struct A { | |
char p_1; | |
double p_2; | |
short p_3; | |
short p_4; | |
}; | |
int main(int argc, const char * argv[]) | |
{ | |
std::cout << sizeof(A) << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment