main(){
char Monster_Name[]="Bear";
clrscr();
printf("%s", Monster_Name);
getch();
return(0);
}
That should work. Either that, or declare Monster_Name as a "char *", then
assign it that value of "Bear". In C, the use of ""s, usually returns a
pointer to a NULL-terminated string.
> My next question is how do you use dos commands in C++. I mean if I
> wanted to
> make a program that could show all the files in a certain directory, or
> make
> directories, etc. how would I do this?
either system(); or some of the filing commands: unlink(); _dos_findfirst();
> My last question is this. How do you save to a seperate file (name of
> person,
> age, other information), and how do you retrieve this information in the
> same
> program?
fopen();
fputs();
fgets();
fwrite();
fread();
Have Fun - Kev
Kevin Campbell
Sysop of Deimos BBS
E-Mail: Sysop@Deimos.unmanned.co.uk
--- FMail/386 1.02
---------------
* Origin: Mail shipped from Deimos Spaceport (2:259/17)
|