上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 63 下一页
摘要: #include using namespace std;void main(){int n; //求的十进制数cout > n;int saveData[1000]; //保存转换后的的位数;int count = 0; //统计转换后有多少位数int radix =0 ; //转换的基数比如2表示二进制,8表示8进制...cout > radix;int x; for (int i =0; n; ++i){x = n % radix;n = n / radix;saveData[i] = x;++count;}cout = 0; --j){cout > wait;} 阅读全文
posted @ 2013-07-03 18:05 Predator 阅读(1055) 评论(0) 推荐(0) 编辑
摘要: package MyStudents;message Student{optional string name = 1;enum enSex{MALE = 0;FEMALE = 1;}optional enSex student_sex= 2 [default = MALE];};message Classroom{repeated Student students = 1;};#include using namespace std;#include #include "Student.pb.h" #pragma comment(lib, "libprotoc. 阅读全文
posted @ 2013-07-02 20:14 Predator 阅读(689) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include #include #include #include "CSHOW.H"using namespace boost;using namespace std;extern int num;int main(){string command ; while(true){command.empty();cout " ;char ch;while( 0x0A != (ch =getchar()) ){command.insert( 阅读全文
posted @ 2013-07-01 21:08 Predator 阅读(263) 评论(0) 推荐(0) 编辑
摘要: #include #includeusing namespace std;// 方法指针的格式为:int (*ptr)(char *p) 即:返回值(指针名)(参数列表)typedef int (*CallBackFun)(char *p); // 为回调函数命名,类型命名为 CallBackFun,参数为char *p// 方法 Afun,格式符合 CallBackFun 的格式,因此可以看作是一个 CallBackFun int Afun(char *p){ printf("Afun 回调打印出字符%s!\n", p); return 0 ;}// 方法 Bfun,格式 阅读全文
posted @ 2013-07-01 21:07 Predator 阅读(855) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 63 下一页