0

is there a way to get all fields in c++ Like in Java: this.getClass().getDeclaredFields()

I would appreciate an answer

alex3r45u
  • 1
  • 2
  • 1
    Not sure what java getDeclaredFields() does but c++ doesn't have reflection yet so it's not possible yet. Related: [https://stackoverflow.com/questions/68761022/reflection-ts-in-c23](https://stackoverflow.com/questions/68761022/reflection-ts-in-c23) – drescherjm Feb 18 '22 at 13:25
  • 3
    No this would require reflection information which C++ doesn't have. – Borgleader Feb 18 '22 at 13:25
  • You can not overflow dot operator in C++. C++ is not Java. –  Feb 18 '22 at 13:57

0 Answers0