stringstream ºÍ stringbuf
stringstream µÄ ÃèÊöÊÇ£ºstringstream class provides an interface to manipulate strings as if they were input/output streams.
¶ø stringbuf µÄÃèÊöÊÇ£º
The objects of this class associate an input and an output sequence with a sequence of characters, allowing the input and output functionality of streams to be performed on strings.
ºÃÏñ¶¼Êǽ«Á÷ʽ IO ²Ù×÷ÓÃÓÚ×Ö·û´®´¦Àí£¬ÎªÊ²Ã´ÎÒÃÇÐèÒª2¸ö£¿
ÎÒÏÖÔÚµÄÎÊÌâÊÇ£¬ÓÐÒ»ÅúΪÊýÖÚ¶àµÄ½á¹¹»¯Êý¾ÝҪͨ¹ýÍøÂç´«µÝ£¬Òò¶øÎÒѰÇóÒ»ÖÖ½«Á÷ʽ IO ÓÃÓÚÄÚ´æ²Ù×÷µÄ·½Ê½£¬£¨ÎÒ³ÆÖ®Îª¡°±àÂ롱£©£¬½«¸÷ÀàÊý¾Ý´æ·ÅÔÚÁ¬ÐøµÄÄڴ棨×Ö·û´®£©ÖУ¬¼´¿Éͨ¹ýÍøÂç·¢ËͳöÈ¥ÁË¡£
ÄÇôÎҸòÉÓÃÄĸöÀàÀ´´æ·Å±àÂë²Å±È½ÏºÏÀí£¿
·ÅÔÚÈÝÆ÷À¶¼¿ÉÒÔ
Ò³:
[1]