终于明白了,谢谢各位,是内存分配的问题
在 2012年2月28日 下午9:38,Double Dark 写道:
> 把所有的 * 号都去掉一个就可以了,就是原来俩的变一个,原来一个的变没有。
>
> On Tue, Feb 28, 2012 at 09:26:11PM +0800, 盖慧彤 wrote:
> >Date: Tue, 28 Feb 2012 21:26:11 +0800
> >From: 盖慧彤
> >To: ubuntu-zh mailing lists
> >Subject: Re: [Ubun
把所有的 * 号都去掉一个就可以了,就是原来俩的变一个,原来一个的变没有。
On Tue, Feb 28, 2012 at 09:26:11PM +0800, 盖慧彤 wrote:
>Date: Tue, 28 Feb 2012 21:26:11 +0800
>From: 盖慧彤
>To: ubuntu-zh mailing lists
>Subject: Re: [Ubuntu-zh] gdb下的调试问题
>
>你并没有分配空间啊,scanf当然会出错
>
>在 2012年2月28日 下午9:07,Endwens Cheng 写道
抱歉看的没太仔细就回复了……
于 2012年02月28日 21:26, 盖慧彤 写道:
你并没有分配空间啊,scanf当然会出错
在 2012年2月28日 下午9:07,Endwens Cheng写道:
1 #include
2 #include
3 int main ()
4 {
5 char *c[3];
6 char **p;
7 int i=0;
8 p=c;
9 printf("
你并没有分配空间啊,scanf当然会出错
在 2012年2月28日 下午9:07,Endwens Cheng 写道:
> 1 #include
> 2 #include
> 3 int main ()
> 4 {
> 5 char *c[3];
> 6 char **p;
> 7 int i=0;
> 8 p=c;
> 9 printf("please enter the strings: ");
>
for(p;p
1 #include
2 #include
3 int main ()
4 {
5 char *c[3];
6 char **p;
7 int i=0;
8 p=c;
9 printf("please enter the strings: ");
10 for(p;phttps://lists.ubuntu.com/archives/ubuntu-zh/at
1 #include
2 #include
3 int main ()
4 {
5 char *c[3];
6 char **p;
7 int i=0;
8 p=c;
9 printf("please enter the strings: ");
10 for(p;phttps://lists.ubuntu.com/archives/ubuntu-zh/attachments/2