How to store a value as a database in cocos2d-x (c++) ios game

I am totally new to cocos2d-x ios game development and really learning a lot from cococ2d-x.org.Just want to thank all the software coders.Now my question is I am making a game with levels and high score.But still couldn’t find a way to store the high score and the levels cleared.When the game restarts all the values are set to initial values as there is no database to fetch.I have heard about userdefault in cocos2d-x but really couldn’t find a way to execute. Can anyone help me with a sample. I will be thankful to you

http://www.cocos2d-x.org/reference/native-cpp/V3.0beta/db/d94/classcocos2d_1_1_user_default.html#details