>if(p->get_a()->get_b()->get_c() == 100){
( )で囲えば?
if((p->get_a()->get_b()->get_c()) == 100){

それか、逆に書く
if(100 == (p->get_a()->get_b()->get_c())){