PDA

View Full Version : This line appears on the top of my new header file for a project



Weichen
19th September 2010, 18:09
æ¤£æ¹¦æ•¤â¦ä¥†ä‘Žä¥„ä± ää¡Ÿà¨æ£æ™¥æ¹©â¥ä¥ ä‘Žä¥„ä±ää¡Ÿà¨à¨æ £æ‘®æ™©â¼ â€¯ä¥†ä‘Žä¥ ä±ää¡Ÿà¨

I don't know what that is, it just appeared on my newly created header file for a project. it has red line under it. when I hover my mouse over, it displayed expected a declaration.

਍
also appared on my newly created cpp file that defines my header file.

at first, I just simply delete these undefined rubish. however, I can't get my project to compile. It produced bunch of errors.

stray '\377' in program
stray '\376' in program
stray '#' in program

lots of null character ignored

the following is my code for the header file



#ifndef FindDialog_h
#define FindDialog_h

#include <Qdialog>

class QCheckBox;
class QLabel;
class QLineEdit;
class QPushButton;

class FindDialog : public QDialog
{
Q_OBJECT

public:
FindDialog(QWidget *parent = 0);

signals:
void findNext(const QString &str, Qt::CaseSensitivity cs);
void findPrevious(const QString &str, Qt::CaseSensitivity cs);

private slots:
void findClicked();
void enableFindButton(const QString &text);

private:
QLabel *label;
QLineEdit *lineEdit;
QCheckBox *caseCheckBox;
QCheckBox *backwardCheckBox;
QPushButton *findButton;
QPushButton *closeButton;
};

#endif

I deleted the rubish at the begining

Lykurg
19th September 2010, 20:50
It's
#include <QDialog>but that's probably just a typo. make sure you have deleted all the rubbish and that there is no invisible rest. Also make sure you set the right text encoding. Do you use Qt Creator?