Here is the declaration of my QFILE class.

```
class AbsFileHandler
    {

    public:
        QFile absfile;
        QString absfilename;
        QTextStream absstream;
        void CreateAbsFile();
        void CloseAbsFile();

        AbsFileHandler()
        {

        }
        ~AbsFileHandler()
        {
        }

    };

```

And its method construction

```
void AbsFileHandler::CreateAbsFile()
    {

        absfilename = absfilename + '.abs';
        absfile(absfilename);

        if (!absfile.open(QIODevice::WriteOnly | QIODevice::Text))
            qDebug() << absfile.errorString();
        else
            qDebug() << "It worked";

    }

void AbsFileHandler::CloseAbsFile()
    {
        absfile.close();
    }

```

I am having error in the absfile(absfilename); statement. Why was the error in this statement. Thanks.