6 February 2016

gxachaturov: (Default)
Incorrect, Karl:

    void myclass::Deserialize(long &count, FILE *pfin){

              int sz = sizeof(*this), i;
              char *pf = (char*)this;

              for (i = 0; i < sz; pf++, i++, count++)
                       *pf = fgetc(pfin);  
    }

Correct:

     void myclass::Deserialize(long &count, FILE *pfin){

            int sz = sizeof(*this), i, auxcount = count;
            char *pf = (char*)this;

            for (i = 0; i < sz; pf++, i++, auxcount++)  
                      *pf = fgetc(pfin);
  
            count = auxcount;
}

Profile

gxachaturov: (Default)
gxachaturov

September 2025

S M T W T F S
 1 23 456
7 8 91011 1213
14151617181920
2122 2324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated 24 September 2025 06:23
Powered by Dreamwidth Studios