摘要:
写了一小段代码:练习一下友元类和友元函数的声明和使用;练习一下最简单的快排算法;练习一下递归的方法处理全排列问题。代码: 1 #include 2 #include 3 4 class Something; 5 6 // 友元函数可以提前在类外定义,也可以不这么做 7 int get_data(Something& sth); 8 9 class Otherthing; 10 class Something 11 { 12 private: 13 int data; 14 15 // 友元类定义的位置在private,public,protecte... 阅读全文
posted @ 2013-10-31 10:12
铁甲小宝
阅读(272)
评论(0)
推荐(0)
浙公网安备 33010602011771号