C' Fragment
°ÑÊäÈëµÄÒ»´®×Ö·ûת³ÉÊý×飬ת³ÉÁ´±í£¬È»ºóɾȥÆäÖÐÖ¸¶¨µÄ×Ö·û£¬ÔÚβ²¿Ìí¼ÓÒ»¸ö×Ö·û¡£
£¨³ÌÐò»¹²»ÍêÉÆ£¬Ã»ÓжÔÊä´íµÄÇé¿ö½øÐд¦Àí£¬£¬ÔÝʱÏÈÕâÑù°É¡£¡£= =¡££©
#include<stdio.h>
#include<malloc.h>
#define LEN sizeof(struct link)
struct link
{
char ch;
struct link *next;
}*string;
char a[80]={0};
void array()
{
scanf("%s",a);
}
void creat(char *a)
{
int i;
struct link *head,*p;
p=head=(struct link *)malloc(LEN);
for(i=0;i<80;i++)
{
if(*(a+i)!=0)
{
p->ch=*(a+i);
p->next=(struct link *)malloc(LEN);
p=p->next;
}
else
{
p->ch=0;
p->next=NULL;
break;
}
}
string=head;
}
void print(struct link *head)
{
struct link *p;
p=head;
while(p->next!=NULL)
{
printf("%c ",p->ch);
p=p->next;
}
printf("\n");
}
void del(struct link *head)
{
char a[1]={0};
struct link *p1,*p2;
p1=head;
printf("input the char you delete:");
scanf("%s",a);
while(a[0]!=p1->ch&&p1->next!=NULL)
{
p2=p1;
p1=p1->next;
}
if(p1==head)
head=p1->next;
else
p2->next=p1->next;
string=head;
print(head);
}
void add(struct link *head)
{
struct link *p;
char c[1];
printf("input the char you add:");
scanf("%s",c);
p=head;
while(p->next!=NULL)
p=p->next;
p->ch=c[0];
p->next=(struct link *)malloc(LEN);
p=p->next;
p->ch=0;
p->next=NULL;
print(head);
}
void main()
{
array();
creat(a);
print(string);
del(string);
add(string);
}
Ïà¹ØÎĵµ£º
CAPTION: ¹ØÓÚC/C++ÖÐÄÚ´æ¿Õ¼äµÄ»®·Ö
AUTHOR: aIsland Õª×ÔÖйúITʵÑéÊÒ
DATE: 2010-05-30
E-MAIL: aIsland@live.cn
QQ: 418662213
P.S.
1.Bolanlan|ËæÐÄhigh|aIsland Èý¸öÍøÃû¾ùΪ±¾ÈË
2.ÉùÃ÷aIsland ËùÊÕ¼µÄËùÓÐÎÄÕÂÆäÖø×÷Ȩ¶¼ÊôÓÚÔ´´×÷Õß
  ......
/*
* File: main.cpp
* Author: Vicky
*
* Created on 2010Äê5ÔÂ8ÈÕ, ÏÂÎç2:47
*/
#include <iostream>
using namespace std;
class A{
public:
A(){
cout << "Ö´Ðй¹Ô캯Êý´´½¨Ò»¸ö¶ÔÏó" << endl;
}
A(A&){
cout << "Ö´Ðп½±´º¯Êý¿½±´Ò»¸ö¶ ......
¡¶Cר¼Ò±à³Ì¡·Ñ§Ï°×ܽá2
ת×Ô £º http://blog.chinaunix.net/u2/87570/showart_2120069.html
±àÒëÆ÷×öÁËЩʲô
ͼ1£º±àÒëÆ÷ͨ³£·Ö¸î³É¼¸¸ö¸üСµÄ³ÌÐò
¾²Ì¬Á´½ÓÓ붯̬Á´½Ó
  ......
oracleÖÐpro*cµÄѧϰ
¡¡Ò» Pro*C ³ÌÐò¸ÅÊö£º
1£®Ê²Ã´ÊÇPro*C³ÌÐò
ÔÚORACLEÊý¾Ý¿â¹ÜÀíºÍϵͳÖУ¬ ÓÐÈýÖÖ·ÃÎÊÊý¾Ý¿âµÄ·½·¨£»
£¨1£© ÓÃSQL*Plus£¬ ËüÓÐSQLÃüÁîÒÔ½»»¥µÄÓ¦ÓóÌÐò·ÃÎÊÊý¾Ý¿â£»
£¨2£© ÓõÚËÄ´úÓïÑÔÓ¦Óÿª·¢¹¤¾ß¿ª·¢µÄÓ¦ÓóÌÐò·ÃÎÊÊý¾Ý¿â£¬ÕâЩ¹¤¾ßÓÐSQL*froms£¬QL*Reportwriter,SQL*MenuµÈ£»
£¨3£© ÀûÓÃÔÚ ......