2

In a large C header file where defines many struct, like following,

struct s1 {
  ...
};

struct s2{
  int var_1;
  int var_2;
  int var_3;

  ...
  int var_200;
  ...

  int var_500;
};

struct s3{
  ...
};

I want to know var_200 belongs to which struct, in this case, it is s2.

Scrolling up in this case, not only slow, but also easy to miss the correct curly bracket(because there can be struct in the struct, there could be many curly bracket). Is there any good method to do this?

4
  • This is quite old (and not about C), but maybe it will help: stackoverflow.com/questions/2107301/…. Commented Mar 7 at 9:30
  • There's about one single nice thing in Eclipse and that's the F3 key. Commented Mar 7 at 9:35
  • @wohlstad I don't think so. That post is talking about "I see s2->var_200, and jump to var_200 definition location", my post is about "I see var_200 in its definition location, I want to know which struct it belongs to" Commented Mar 7 at 9:36
  • @gx16 fair enough. Commented Mar 7 at 9:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.