0

Hello, I've been pulling my hair out trying to figure out how to fix this. I don't have a lot of experience with OOP, so I'm at a bit of a dead end.

I am getting an error:

error: expected class-name before '{' token

The header file is this:

#ifndef SAVEDOM_H
#define SAVEDOM_H

#include <Qt>
#include <QtGui>
#include <QLabel>
#include "ui_saveDOM.h"
#include "qdom.h"
#include <QDomDocument>
#include <QDir>

class saveDOM :  public QMainWindow, private Ui::saveDOM
{              //line 22
 ...
};
 #endif

The .cpp file currently empty (although it wasn't at one point, it didn't change the errors)

What is strange is that I literally copied this from another header file in the project which compiles and runs fine.

Does anyone have any suggestions? Thanks!

edit: the full error is as follows
saveDOM.h:22: error: expected class-name before '{' token

Let me know if more information is needed.

3
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by ArkM
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.