PDA

View Full Version : Missing include file <qstd.h>



Ilia
29th June 2012, 01:31
Hi Everyone, This would be my first time using a programming forum - so appolagies for my noobness in advanced!!

I am learning Qt4 on Windows with the book "Introduction to Design Patterns in C++ with Qt4" which seems popular.

One of the problems introduces "namespace qstd;". From what I have read, this namespace requires an include file <qstd.h>. When i Add the following line of code into my program;

using namespace qstd.h

I get the following Error:

qstd.h: No such file or directory

After searching for qstd.h throughout my Qt directories, it seems that I dont have this header!! This seems bizzar to me =?

can anyone can point out some serious flaws in my methods (which I know is likley) ?? Otherwise if this all seems legit, I would very much appreciate if someone could send me the header file (couldnt find one with a basic google search)

thanks a lot for your time.
Ilia

ChrisW67
29th June 2012, 03:36
#include "qstd.h"
using namespace qstd;

The content of qstd.h is in example 20.12 of my copy of the book... it is not part of Qt.

Ilia
29th June 2012, 04:56
Thanks for the response, it was what I was looking for!

Ali Reza
29th June 2012, 13:25
namespace is name of a code block and by command using namespace you can declear a block of codes that have a specific name.
Example:

namespace myns
{
int num;
}
in other places you can use this integer variable by follow:
for ex:

myns::num=12;