improve struct parsing
add C++ example