自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Carter的程序人生

Carter,2007年开始从事互联网开发工作,工作经历:小公司->赶集->百度->数字

  • 博客(29)
  • 资源 (9)
  • 收藏
  • 关注

原创 VC++新建选择卡的解释

新建选项卡一::Active Server Page 活动服务器页Binary File  二进制文件Bitmap File  位图文件C/C++ Header File C/C++头文件C++ Source File  C++源文件Cursor File  光标文件HTML File  HTML文件Icon File  图标文件Macro File  宏文件Resource Script  资源

2009-10-29 09:26:00 593

原创 宏判断类是否定义

#ifndef ANIMAL_H_H#define ANIMAL_H_Hclass Animal{public: Animal(int height,int weight); void eat(); void sleep(); virtual void breathe();};#endif

2009-10-26 16:22:00 950

原创 桶子算法

#include using namespace std;int main(){ int lsd,i,j,k,n; n=1; k=0; int str[10]={91,20,33,45,6,87,7,3,55,15}; int temp[10][10]={0}; int order[10]={0};    cout for (i=0;i {  cout }  cout while (n {

2009-10-26 12:50:00 439

原创 找最多0

#include void main(){int i,j,m,n,t,s,l;int ch[3][5]={1,1,0,0,0,1,1,1,0,1,1,0,0,1,1};int w[3];for (i=0;i{m=0;for (j=0;j{if (ch[i][j]==0){++m;}}w[i]=m;}for (t=0;t{for (n=0;n{if (w[n]{s=w[n];w[n]=w[n+1

2009-10-26 10:38:00 411

原创 去掉二维数组重复值[算法]

#include void main(){ int i,j,m=0,w,n,t; int ch[3][5]={  2,1,3,4,1,  6,7,8,9,10,  11,12,1,13,1 }; int*a=new int[18]; for (i=0;i {  for (j=0;j  {   a[m] = ch[i][j];   m++;  } } for (j=0;j {  for (i

2009-10-26 09:31:00 785

原创 字符串位置查询

#include using namespace std;int Length(char ch[]){ int i=0; while(ch[i]!=/0){i++;} return i;}int Fink(char ch[],char c){ for (int i=0;i {  if (ch[i]==c)  {   break;  } } return i+1;}void main(){ ch

2009-10-24 09:43:00 772

原创 合并字符

#include using namespace std;int Length(char ch[]){ int i=0; while (ch[i]!=/0){i++;} return i;}char *Link(char ch1[],char ch2[]){ int s1=Length(ch1),s2=Length(ch2); char*p=new char[s1+s2+1]; for (in

2009-10-23 16:12:00 434

原创 右截取

#include using namespace std;char *str_right(char [],int);int str_check(char []);void main(){ char ch[]="sqlserver"; char*p=str_right(ch,5); cout}int str_check(char ch[]){ int sum=0; for (int m=0;ch[m

2009-10-23 11:25:00 578

原创 隐藏ie地址栏

function sms( aobj, flag){try{var width = 470;var height = 392;var left = ( screen.width - width ) / 2;var top = ( screen.height - height ) / 2;var href = aobj.href;var param = resizable=0, scrollb

2009-10-22 08:36:00 757

原创 JS控制图片大小

var flag=false;   //控制小图function DrawImage(ImgD,maxwidth,maxheight){     var image=new Image();    image.src=ImgD.src;     if(image.width>0 && image.height>0){      flag=true;      if(image.width/ima

2009-10-22 08:36:00 801

原创 string型字符串

1::char和string比较#include #include using namespace std;int main(){ string str="string类型字符串"; char ch[]="char型字符串"; cout cout cout cin>>str; if (str=="dog") {  cout  cout } else {  cout } cout cin>>ch

2009-10-21 15:17:00 1428

原创 char型字符串

#include using namespace std;int main(){ /*例一:: char man[12]; cin.get(man,12); 保存12-1个字符,第12位为/0,结束符 空格ASCII为:32 空字符ASCII为:0 cout */  /*例二::  char man[]={a,32,b,/0};  不加/0算是数组,加了算是字符串.

2009-10-21 14:43:00 603

原创 类的函数指针

一::#include using namespace std;class A{public: void Set(int x,int y){a=x;b=y;} void Show(){coutprivate: int a; int b;};void (A::*p)(int,int);/*类的成员函数指针*/int main(){ A a; p=&A::Set; int x=2,y=3; (a.

2009-10-21 10:24:00 556

原创 使用typedef简化函数指针的声明

#include using namespace std;void square(float&x,float&y){x=x*x;y=y*y;}void cube(float&x,float&y){x=x*x*x;y=y*y*y;}typedef void (*p)(float&,float&);void print(p vp,float&x,float&y)//用指针p声明出来一个vp{ cout

2009-10-21 10:03:00 582

原创 函数指针也可作为函数的参数

#include using namespace std;void square(float&x,float&y){x=x*x;y=y*y;}void cube(float&x,float&y){x=x*x*x;y=y*y*y;}void print(void (*p)(float&,float&),float&x,float&y){ cout cout p(x,y); cout cout}voi

2009-10-21 09:33:00 408

原创 函数指针数组

#include using namespace std;void (*p[5])(int&,int&);//全局的.void square(float&x,float&y){x=x*x;y=y*y;}void cube(float&x,float&y){x=x*x*x;y=y*y*y;}void print(float&x,float&y){coutvoid Swap(float&x,float

2009-10-21 09:18:00 410

原创 函数指针

#include #include using namespace std;/*int(*func)(int);long(*func1)(int); //声明了一个指针.该指针指向一个函数.long *func1(int);  //声明了一个函数.该函数返回一个指针.*/float (*fp)(float&,float&);void (*p)(float&,float&);float triang

2009-10-20 16:37:00 373

原创 静态成员的使用

#include using namespace std;class aspl{public: aspl(float p){price=p;TotalPrice=TotalPrice+p;} ~aspl(){TotalPrice=TotalPrice-price;} static float get(){return TotalPrice;}private: float price; static

2009-10-20 15:44:00 434

原创 静态成员函数

#include using namespace std;class A{public: void static show(){cout void get(){cout/* 类中任何成员函数都能访问静态成员 静态成员函数不能直接访问非静态成员 静态成员函数不能被说明为虚函数*/private: static int n; int m;};class B:public A{ };int A::n=0

2009-10-20 15:28:00 392

原创 私有静态成员变量

#include using namespace std;class A{public: void Func(){coutprivate: static int x;};int A::x=1000;int main(){ A a; a.Func(); /*静态私有成员.访问的前提.必须有该类的对象A a;a.Func();*/ return 0;}

2009-10-20 14:59:00 935

原创 静态成员变量

#include using namespace std;class A{public: A(int num):it(num){total++;} static int total; virtual ~A(){total--;} int get(){return it;} void set(int age){it=age;}private: int it;};int A::total=0;void

2009-10-20 14:52:00 742

原创 抽象类实例

#include using namespace std;class  Shape{public: virtual double area()=0;};/*三角形类*/class Trigon:public Shape{protected: double h,w;public: Trigon(double H,double W) {  h=H;  w=W; } double area() {  r

2009-10-20 13:49:00 649

原创 纯虚函数与抽象类

#include using namespace std;class Human//接口类ADT{public: Human(){cout virtual void smart()=0;       //纯虚函数. virtual void beautiful()=0;   //纯虚函数. virtual ~Human(){cout};class father:virtual public Hum

2009-10-20 13:00:00 497

原创 模拟抽象类

#include using namespace std;class Human//接口类ADT{public: Human(){cout virtual void smart(){} virtual void beautiful(){} virtual ~Human(){cout};class father:virtual public Human{public: father(){cout v

2009-10-20 11:18:00 508

原创 多重继承

#include using namespace std;class father{public: father(){cout void smart(){cout virtual ~father(){cout};class mother{public: mother(){cout virtual void beautiful(){cout virtual ~mother(){cout};class

2009-10-20 10:58:00 388

原创 在派生类中增加函数

#include using namespace std;class father{public: void smart(){cout //virtual void beautiful(){} virtual ~father(){cout};class son:public father{public: void beautiful(){cout ~son(){cout};int main(){ 

2009-10-20 10:46:00 615

原创 多重继承

#include using namespace std;class father{public: void smart(){cout virtual void beautiful(){} virtual ~father(){cout};class son:public father{public: void beautiful(){cout ~son(){cout};int main(){ fa

2009-10-20 10:33:00 451

原创 走迷宫

// GameWnd.cpp : implementation file////#include "stdafx.h"#include "game.h"#include "GameWnd.h"#ifdef _DEBUG#define new DEBUG_NEW#undef THIS_FILEstatic char THIS_FILE[] = __FILE__;#endif///////

2009-10-20 10:10:00 852

原创 C++键盘事件

VK_A~VK_Z从A键到Z键.VK_0~VK_9从0键到9键.VK_F1~VK_F12从F1键到F12键.VK_DOWN向下键头VK_UP向上键头VK_LEFT向左键头VK_RIGHT向右键头VK_ESCAPE::ESC键VK_DELETE::DELETE键VK_INSERT::INSERT键VK_SHIFT::SHIFT键VK_CONTROL::CT

2009-10-19 15:52:00 7363

Go语言圣经golang.pdf

Go语言圣经golang.pdf

2020-04-24

Wrox.-.Beginning.Php,.Apache,.Mysql.Web.Development.(2004)

Wrox.-.Beginning.Php,.Apache,.Mysql.Web.Development.(2004)

2011-05-25

OO_Programming_with_PHP5

OO_Programming_with_PHP5

2010-07-09

比较不错的Flex 教程

Flex 教程 Flex 教程 Flex 教程 Flex 教程 Flex 教程 Flex 教程 Flex 教程 Flex 教程 Flex 教程 Flex 教程 Flex 教程 Flex 教程 Flex 教程 Flex 教程 Flex 教程 Flex 教程

2010-05-19

网页浮动广告代码 非常好在右侧

网页浮动广告代码 非常好的 网页浮动广告代码 非常好的 网页浮动广告代码 非常好的

2008-12-05

网页浮动广告代码 非常好的

网站浮动广告代码 网页浮动广告代码 非常好的 网页浮动广告代码 非常好的

2008-12-05

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除