Leave the sad tone at the beginning. Question: This time I pulled visit out of the sky. What is the use of this product? Well, let's start with a story: Suppose you have a crush on a goddess (just called milk tea MM ~), The first step in pursuit must be to first know some of her information, such as name, age, height, and measurements. But if you're shy, you don't know where to start. At this time, the bloggers are down from the sky! The blogger said: the most comprehensive first-hand information about milk tea MM is in a dic dictionary. If you want to know it, just pick it up. You are very happy to say with excitement: Where is dic? The blogger is stunned, dic... (shlt, dic hasn't been compiled yet, and you have to generate one.) [cpp] Dictionary * dic = Dictionary: create (); // create a Dictionary dic-> setObject (String :: create ("NaiChaMM"), "name"); // Add the name, age, and height in the dictionary to three keys dic-> setObject (Integer: create (20 ), "age"); dic-> setObject (Integer: create (162), "height, said: Nima, how can I view the information in dic? If my pants are removed, will you show me this ?? The blogger was very embarrassed and said: You can use visit to view the dashboard in dic by [cpp] PrettyPrinter visiter; // create a visit dic-> acceptVisitor (visiter ); // obtain information in dic through visit and organize it into a string. CCLOG ("% s", visiter. getResult (). c_str (); // use getResult () to obtain the string sorted by visit in the previous step. Print the string and use the blogger's method to open the dictionary dic and view the information in it, well, my name is milk tea and my sister is correct. My height is 162. Well, it's not very tall, but your food is. I am 20 years old, so young ...... I ++, I agree on the three sides! If you feel cheated, you yell at the blogger angrily: Why didn't you have this information? No, no QQ For your sister with milk tea !!! (Fortunately, it is clever enough to let the bloggers see the essence of their color wolf. You are glad in your heart ). The blogger is also helpless, saying: if there is tea sister QQ, will the blogger write a blog here? In this case, I am also a person with an identity and cannot disappoint you. I have an array, which contains a lot of information about the goddess. Now, we will show you how to open it ***. After that, the blogger quickly knocked on the Code: [cpp] auto array = Array: create (); auto dic_NaiChaMM = Dictionary: create (); // create a Dictionary, and enter the relevant information: auto dic_KeLeMM = Dictionary: create (); auto dic_KaFeiMM = Dictionary: create ();... array-> addObject (dic_NaiChaMM); // put the dictionary into array-> addObject (dic_KeLeMM); array-> addObject (dic_KaFeiMM); // view the PrettyPrinter visiter method; // array1-> acceptVisitor (visiter); CCLOG ("% s", visiter. getResult (). C_str (); you have obtained a lot of information about the Goddess through the blogger's method. When I said goodbye to the blogger, I quickly went home, closed the doors and windows, and pulled the curtains ...... the blogger smiled and watched you leave. Then, he nodded slightly and suddenly left, hiding the power and name! At this time, it seems that the song of the blogger is still circulating in the air: "You are leaving, I know it is very simple... you say that dependency is our obstacle .. even if we let it go, can we not lose my love, as I finally understand... ". The voice is deep and sexy, with a faint sadness...