摘要: 1可以在css中采用float:left;(适合于文字和图片) 2也可以在css中用diaplay:inline;(此方法不会屏蔽用<div>块设置的颜色,且适合于文字). 如: <!doctype html><html><head><meta charset="utf-8"><style type 阅读全文
posted @ 2017-11-05 10:16 balance_uit 阅读(2746) 评论(0) 推荐(0)
摘要: c语言里,不能直接在定义结构体时,给其中元素赋值。 #include<stdio.h>#include<malloc.h>typedef struct tree{ int data; struct tree *left; struct tree *next=NULL;}zhizhen;int mai 阅读全文
posted @ 2017-11-04 16:10 balance_uit 阅读(1334) 评论(0) 推荐(0)
摘要: #include<stdio.h>int main(){ int a=1; int *b; b=&a; return 0;} 若将b=&a改为*b=a,运行时将会出现错误。下面是几种对指针变量b的赋值: p=&a; p=NULL; p=0; p=(int *)1732; 阅读全文
posted @ 2017-10-31 22:50 balance_uit 阅读(200) 评论(0) 推荐(0)
摘要: #include<stdio.h>void numberC(int a,int b){ int c; c=a; a=b; b=c;}void addressC(int *c,int *d){ int *a; a=c; c=d; d=a;}void towardC(int *c,int *d){ in 阅读全文
posted @ 2017-10-31 22:41 balance_uit 阅读(853) 评论(0) 推荐(0)
摘要: 不能在实现函数返回在函数内部定义的局部数据对象的地址, 这是因为所有的局部数据对象在函数返回时就会消忙,其值不在有效。 #include<stdio.h> char *match(char *s,char ch);int main(){ char ch,str[80],*p=NULL; printf 阅读全文
posted @ 2017-10-20 20:35 balance_uit 阅读(1003) 评论(0) 推荐(0)