#include <iostream>
#include <string>

struct Food {
    std::string name;
    int count;
};

struct ssss {
    int p;
    int k;
};

struct Test {
    int a;
    char b;
    double c;
    float d;
    long e;
    ssss f;
};


struct안에 std::string 할당하는경우, string 크기가 어떤지 알수없는데,

Food 구조체 안에서 name, count의 메모리 주소가 연속적으로 되는건가요?


바로 밑의 Test 구조체는 정적이니깐 포인터로 카운팅해서 접근이 가능한데, 

Food는 될지 모르겠네요..


쓸때는 그냥 Food.name, Food.count 형태로 쓰긴하는데, 실제 메모리 관점으로 궁금합니다.