Dear Vinicius -
Unfortunately it's PowerBuilder, not C and you cannot use sizeof(...). There is no function to determine the lenght of the structure. I guess if you really need to know the size of it in chars, you'll need to create a variable of type String, convert every element into this and...
SarahKate31 -
your are most likely looking for eof() method for the ifstream class.
what you can do is:
...
ifstream starFile ("star.dat");
if(!starFile) cout<<"cannot open"<<endl;
while (starFile)
{
starFile.read((char *) &<your storage>, sizeof(<your storage>)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.