🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.programmer.codewarrior
Article #27

Re: Help! I've got an error and don't know why

#27
From: O. Beaudoux
Date: Wed, 15 Nov 1995 00:17
77 lines
2874 bytes
In article <488nue$l25@eri2.erinet.com>, <jab@bowtech.erinet.com> writes:
> Path: 
univ-angers.fr!jussieu.fr!oleane!plug.news.pipex.net!pipex!tank.news.pipex.net!
pipex!news.mathworks.com!newsfeed.internetmci.com!in1.uu.net!news.erinet.com!bo
wtech.erinet.com!jab
> From: jab@bowtech.erinet.com (Jerone A. Bowers)
> Newsgroups: comp.lang.c,comp.sys.mac.programmer.codewarrior
> Subject: Re: Help! I've got an error and don't know why
> Followup-To: comp.lang.c,comp.sys.mac.programmer.codewarrior
> Date: 14 Nov 1995 00:30:06 GMT
> Organization: BowTech
> Lines: 48
> Message-ID: <488nue$l25@eri2.erinet.com>
> References: <futro-1111950910120001@leaveystaff17.usc.edu>
> NNTP-Posting-Host: bowtech.erinet.com
> X-Newsreader: TIN [version 1.2 PL2]
> Xref: univ-angers.fr comp.lang.c:21127 
comp.sys.mac.programmer.codewarrior:11835
> 
> Peter Futro (futro@scf.usc.edu) wrote:
> 
> : #include <stdio.h>
> 
> : main()
> : {
> 
> :         int i,Month=11;
> 
> :         char 
Month_string[12][15]={"Janurary","Feburary","March","April","May",
> : "June","July","August","September","October","November","December"};
> :         
> :         char full_day[1][15];
> 
> :         for(i=0;i<12;i++)
> :         {
> :                 printf("%d: %s\n",i,Month_string[i]);
> :         }
> :         printf("\n");
> 
> :         if(Month==11)
> 
> :                 full_day=Month_string[10];
> 
> 		try strcpy(full_day,Month_string[10]);  if you use strcpy then 
besure to add the string.h header file 
> 		or change char full_day[1][15] to char *full_day and then your
> 		assingment will work.
> 
> :         printf("%s\n",full_day);
> 
> : }
> 
> : I have also tried to set full_day manually with full_day="November"; and I
> : get the same errors
> 
> 
> : Thank you in advance for any help,
> 
> : Pete Futro
> : futro@scf.usc.edu
> : http://www-scf.usc.edu/~futro
> 
> --
> These thoughts are mine and mine alone.    I can say that, right?
> 
> EMAIL: zen0001@bowtech.erinet.com 	|  An intellectual does not
> SMAIL  9221 N Main St			|  a wise man make.
> Dayton, OH 45415-1126			|  
Hi,

Perhaps you have to add the ascii 0 char:

char Month_string[12][15]={"Janurary\0","Feburary\0","March\0",...

Bod.
Technical Details
Message-ID: <48abhb$72o@news.univ-angers.fr>
Path: arc1-ca.pugleaf.net!univ-angers.fr!usenet
References: <488nue$l25@eri2.erinet.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!univ-angers.fr!usenet
From: "O. Beaudoux" <beaudoux@lra.eseo.fr>
Newsgroups: comp.sys.mac.programmer.codewarrior,comp.lang.c
Subject: Re: Help! I've got an error and don't know why
Followup-To: comp.lang.c,comp.sys.mac.programmer.codewarrior
Date: Tue, 14 Nov 95 17:17:58 PDT
Organization: Universite d'Angers, France
Message-ID: <48abhb$72o@news.univ-angers.fr>
References: <488nue$l25@eri2.erinet.com>
NNTP-Posting-Host: lra.eseo.fr
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Newsreader: NEWTNews & Chameleon -- TCP/IP for MS Windows from NetManage