LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Qt redefining C++ syntax? (https://www.linuxquestions.org/questions/programming-9/qt-redefining-c-syntax-414485/)

snoozing 02-12-2006 06:57 AM

Qt redefining C++ syntax?
 
In a Linux programming environment
this is part of what the "'Hello World' on a GUI" example app
generated.
Another example of Qt redefining the C++ language?
When does a structure contain virtual functions??
Shouldn't it contain just data types?

Code:

//

struct Q_EXPORT QUBuffer
{
    virtual long read( char *data, ulong maxlen ) = 0;
    virtual long write( const char *data, ulong len ) = 0;
};

//


snoozing 02-12-2006 08:48 AM

Another filled me in on the answer to this.

Apparently a structure is basically a class with all public members.

And with a ";" at the end of the struct portion in compiles in MFC.

ntubski 02-12-2006 09:17 AM

Quote:

Originally Posted by snoozing
...
Another example of Qt redefining the C++ language?
When does a structure contain virtual functions??
Shouldn't it contain just data types?
...

Nah, that's C++ redefining basic C constructs :p


All times are GMT -5. The time now is 08:20 PM.