void BATTLE::MakeallMon()
{
string tmpname;
char templine[11];
FILE *ReadMonlocs; //initalize readmonlocs
ReadMonlocs = fopen("monlocs.txt", "r"); //open a stream
while(fgets(templine, 11, ReadMonlocs))
{
if((string)templine == "[location]")
{
system("cls");//debug
fgets(templine, 11, ReadMonlocs);
fgets(templine, 11, ReadMonlocs);
tmpname = templine;
cout << "tmpname: " << tmpname;
system("pause");//debug
MakeMon((int)fgets(templine, 11, ReadMonlocs), (int)fgets(templine, 11, ReadMonlocs), tmpname);
}
}
fclose(ReadMonlocs);
}
void BATTLE::MakeMon(int tx, int ty, string tname)
{
system("cls");
cout << "x: " << tx << endl << "y :" << ty << endl << "name: " << tname << endl;
system("pause");
}
Cyrus Eye design