[ create a new paste ] login | about

Link: http://codepad.org/uuN2GI5w    [ raw code | output | fork ]

C++, pasted on Nov 29:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <QtCore/QFile>
#include <QtCore/QDebug>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <assert.h>

int main(int argc, char *argv[]) {
	assert(mkfifo("test.sock", O_RDWR | O_NONBLOCK) == 0);
	QFile f("test.sock");
	f.open(QIODevice::ReadOnly | QIODevice::Unbuffered | QIODevice::Text);
	while(1) {
		if(!f.waitForReadyRead(6000)) continue;
		QByteArray ba = f.readAll();
		qDebug() << ba;
	}
	return 0;
}


Output:
1
2
3
4
5
Line 23: error: QtCore/QFile: No such file or directory
Line 24: error: QtCore/QDebug: No such file or directory
In function 'int main(int, char**)':
Line 10: error: 'QFile' was not declared in this scope
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: