Is this myFile = SD.open("test.txt", FILE_WRITE); class object usage good/possible in cpp <p>I have created a class object named myFile for a class File which is present in one of my cpp files (FILE.cpp) which I am calling in another file(SDtrail.cpp) where I am working on.</p> <p>In SDtrail.cpp file I have defined a statement as shown below myFile = SD.open("test.txt", FILE_WRITE);</p> <p>So, my doubt is <strong>can I declare like above statement or not</strong> as I think that this is the root cause of the following errors</p> <p>error: no match for 'operator=' in 'myFile = SDClass::open(const char*, uint8_t)(((const char*)"test.txt"), 19u)'</p> <p>error: could not convert 'myFile' to 'bool'</p> <p>I know that SD.open("test.txt", FILE_WRITE); will provide 1(success) or 0(fail) as output and myFile is an object of my File class ( I have declared it as File myFile). <strong>I don't know whether a class object consists of a type declaration.</strong> (FYI: myFile = SD.open("test.txt", FILE_WRITE); worked perfectly when I ran that in my Arduino software and when I have printed the myFile variable I got 1 as an output.) </p> <p>Thanks in advance.</p>