you hear Steven screaming over subspace to All, "Three questions" on 05-28-97
16:15
SD> @MSGID: 1:353/710.0 338cbc92
SD> 1. I have this program that always gives me a warning and I was
SD> wondering if there was a way to get rid of the warning.
SD> #include
SD> main()
SD> {
SD> unsigned char Monster_Name;
SD> Monster_Name = "Bear";
SD> clrscr();
SD> printf("%s", Monster_Name);
SD> getch();
SD> return(0);
SD> }
SD> The warning I get is this :
SD> Warning Nonportable pointer conversion in function main
Try:
#include
void main(void)
{
char *Monster_Name; /* you had unsigned char, you have
to have an * for a string. */
Monster_Name = "Bear";
clrscr();
printf("The %s has killed you!", Monster_Name);
getch();
return(0);
} /* i added a little onto it :) */
Nathan
... ASCII stupid question... get a stupid ANSI!
___ Blue Wave/QWK v2.12
--- Platinum Xpress/Win/Wildcat5! v2.0GY
(1:2002/2002)
---------------
* Origin: Pacific Online Services ISP/BBS (707.588.0250) www.pon.net
|