Skip to main content
gamedev.net
🔒 Locked

eVC++

Started by Indy May 28, 2002 at 2:46 PM 2 replies 550+ views
Original Post
Indy
Indy
Could someone please help me in writing code that will read in a text file using eVC++. The format of the text file is as follows:- xxxx xxxx xxxx xxxx xxxx xxxx .... I don''t understand why M$ had to go and change eVC++ from VC++ for the PC. I''m trying to convert a program I wrote for Windows to WinCE. Any help would be appreciated. Thanks Indy
Indy
xtrmntr
xtrmntr
What exactly isn''t porting over? Maybe provide a few lines from the game you wrote that you wish to convert to eVC++.
Indy
Indy
well it''s not actually a game, more a database''ish type of program. I wrote the original while I was working for a Electronics company.

The original VC++ I used was as follows:-

void LoadPartList(HWND hdwnd)
{
fstream f,mat;
f.open("list.txt",ios::in);
while (!f.eof())
{
f.getline(part[x],15,''\t'');
f.getline(description[x],50,''\n'');
x++;
}
ListLoad=true;
f.close();

mat.open("mats.txt",ios::in);
while (!mat.eof())
{
mat.getline(materials[xx],6,''\t'');
mat.getline(matcode[xx],6,''\n'');
MatIndex=xx;
xx++;
}
mat.close();
mmaterial=0;
}

Worked fine in Windows. First problem, "getline" is not even implemented in eVC++, so I''m TRYING to use _fgetts. I got upto a point where I can read in the text file but don''t know how to tell when I reach a delimter. In the above code it was easy and it worked.
Indy
xtrmntr
xtrmntr
Yeah, one of my gripes is that some really usefully functions and objects are implemented in eVC++ 3.0. You might want to try it out in eVC++ 4.0(.NET) and see if its supported there. Another option is using C style file handling. While not all functions are available you can still implement file reading pretty easily. Sorry I can''t be more help but im in the process of reinstalling eVC++.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.