LoginSignup
5
5

More than 5 years have passed since last update.

構造体が参照している位置を知りたい

Last updated at Posted at 2015-02-16
C++の構造体の例
struct Test
{
    char aa[10];
    char bb[10];
}

こういった構造体があったときに、[bb] を参照している位置が知りたい。

どうすればいいか?

C++の構造体の例
struct Test
{
    char aa[10];
    char bb99[10];    // 名前を変えちゃう
}

そうすると、コンパイルエラーになって場所がわかる。

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5