摘要: 1: //w我们来造一辆车 2: 3: #include <iostream> 4: #define FULL_GAS SS 5: using namespace std; 6: class Car{ 7: public: //这里是冒号 不是分号 8: string color; 9: string engime; //引擎 10: float gas_ta... 阅读全文
posted @ 2013-02-28 23:31 搅着青春吹泡泡 阅读(176) 评论(0) 推荐(0)
摘要: #if(0)#include <iostream>void changeage(int age,int newage);using namespace std;int main(int argc, char *argv[]){ int age =24; cout <<"MY age is"<<age<<endl; changeage(age,age+1); cout<<"Now my age ... 阅读全文
posted @ 2013-02-28 22:08 搅着青春吹泡泡 阅读(171) 评论(0) 推荐(0)
摘要: 什么是联合查询 union是什么意思 如何使用 我的高亮语法还不出来,我想死了 阅读全文
posted @ 2013-02-28 20:55 搅着青春吹泡泡 阅读(110) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2013-02-28 11:03 搅着青春吹泡泡 阅读(96) 评论(0) 推荐(0)
摘要: 这个是大家最早接触的算法吧总在写 总在错, 面试也还忘记学习就是这么个过程, 温故才知新, 望自己谨记忘记不要紧复习就好//排序是有很多种方法的 ,完成从小到大的排列 #include <stdio.h>void sort(int *a,int len){int i=0; int j; int t; for(i=0;i<len;i++) { for(j=0;j<len-i-1;j++) { if(a[j]>a[j+1]) { t=a[j]; a[j]=... 阅读全文
posted @ 2013-02-28 10:52 搅着青春吹泡泡 阅读(272) 评论(0) 推荐(0)
摘要: 1.编写程序在字符串ABCDEF中匹配字符串CDE,并给出时间复杂度#include <stdio.h>#include <string.h>int main(int argc, char *argv[]){ char *str="abcdedab"; char *str2="abd"; int i; int count =0; i=strlen(str2); int n; while(*str !='\0') { for(n=0;n<i;n++) { if( (*(str+n)) != (*(str2+n) 阅读全文
posted @ 2013-02-28 02:49 搅着青春吹泡泡 阅读(378) 评论(0) 推荐(0)
摘要: 题目:给定一个字符串,求出其最长的重复子串如字符串abcdabcabcd,求的最长重复子串为abcd 阅读全文
posted @ 2013-02-28 01:50 搅着青春吹泡泡 阅读(349) 评论(1) 推荐(0)
摘要: #include<stdio.h>int main(){ char a,*p;//p是指向字符型变量的指针 int b=0,n; p=&a; scanf("%s",&a); // 这里为什么 使用了%s for(n=0;*(p+n)!='\0';n++) /*数组 a[i] = *(p+i) */ b++; //统计字符串的长度 printf("%d\n",b); return ... 阅读全文
posted @ 2013-02-28 00:56 搅着青春吹泡泡 阅读(211) 评论(1) 推荐(0)