c++ - Getting error code C2228: left of '._Ptr' must have class/struct/union -


i getting strange error code when try execute line of code.

ctype += file_size(is_directory( d->status()));

here part of code leading error.

void scan(string switches, path const& f, unsigned k = 0) {     // declare file types     long long cpptype = 0, ctype = 0,         htype = 0, hpptype = 0,         hxxtype = 0, javatype = 0,         totalclasstype = 0, avitype = 0,         mkvtype = 0, mpegtype = 0,         mp4type = 0, mp3type = 0;      int cpp = 0, c = 0, h = 0, hpp = 0, hxx = 0, java = 0,         totalclass = 0, avi = 0, mkv = 0, mpeg = 0, mp4 = 0, mp3 = 0;      int totalbytes = 0;     string indent(k, '\t');     directory_iterator temp;     directory_iterator d(f);        //f = first file in folder processed     directory_iterator e;           // signals end of folder      bool isreverse = false;     bool isrecursive = false;      path pth;     pth = d->path();      (unsigned check = 0; check < switches.size(); ++check)     {         if (switches[check] == 'r')         {             isrecursive = true;         }          else if (switches[check] == 'r')         {             isreverse = true;         }     }      (unsigned int = 0; < switches.size(); ++i)     {         if (switches[i] == 'c')             //option c: locate c++ files - extension(s): .c,. cpp, .h, .hpp, .hxx         {             if (pth.extension() == ".c")             {                 c++;                 ctype += file_size(is_directory(d->status()));             } 

any appreciated!

is_directory() returns bool, not path, file_size() takes argument.

the error means file_size() macro, means this:

file_size(is_directory( d->status())) 

is being expanded @ point to:

is_directory( d->status())._ptr 

which can't work, since . operator can't applied bool values.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -