Hello. I am new to this area. I have worked with C++ for almost a year, but
have done nothing serious with it (a few games). I have three question to
whoever can answer them.
1. I have this program that always gives me a warning and I was wondering if
there was a way to get rid of the warning.
#include
main()
{
unsigned char Monster_Name;
Monster_Name = "Bear";
clrscr();
printf("%s", Monster_Name);
getch();
return(0);
}
The warning I get is this :
Warning Nonportable pointer conversion in function main
Any ideas how to get rid of this? I know it doesn't hurt the program, but
when you have 20 or so of them, it gets anoying.
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?
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?
Thank-you very much to those who answer my questions. I know they might seem
trivial, but suggestions would be greatly appreciated! Thanks.
Steve
--- Maximus 2.02
---------------
* Origin: Digital Encounters * Kamloops BC Canada 250/374-6168 (1:353/710)
|