POV-Ray : Newsgroups : povray.off-topic : C++ classes and file i/o : Re: C++ classes and file i/o Server Time
5 Sep 2024 23:15:53 EDT (-0400)
  Re: C++ classes and file i/o  
From: Darren New
Date: 13 Apr 2009 19:15:36
Message: <49e3c798$1@news.povray.org>
stbenge wrote:
> will work just fine elsewhere. Any help would be appreciated. I'm really 
> stumped :(

Step one of being un-stumped is to figure out which of your assumptions in 
the code is not holding true.

Print out fieldFileName.
Print out fieldFile.
Print out tempFx, tempFy, and val each time through the loop.
Print out the return values from fread.
print out sizeof(val).

The question you seek to answer is whether val is being read incorrectly, or 
whether it's the assignment that is failing.

I also wonder why you read tempFx and tempFy and then don't use them for 
anything. I'm assuming this is some header?

Showing the declaration of the rest of the class (including map) is probably 
a good idea.

HTH.

-- 
   Darren New, San Diego CA, USA (PST)
   There's no CD like OCD, there's no CD I knoooow!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.