Hi all,
I have a table design problem with the modeling of the dimensions of a work piece (mechanical part).
A work piece can be cylindrical (radius, height) or cuboid (width, length, height). Actually this is modeled like this :
table work_piece (
id INTEGER,
type INTEGER, -- type = 0...
this->_vtable->add<typename _U_>();
This does not work, g++ outputs :
main.cpp: In member function ‘void functor<_T_>::operator()(const _U_&)’:
main.cpp:23: error: expected nested-name-specifier before ‘_U_’
main.cpp:23: error: expected `(' before ‘_U_’
main.cpp:23: error: expected `;' before...
As I said Qt4 is available as an open-source license and as a commercial license, for all supported platforms (included windows). See Qt/Windows open-source
Really? Regarding performance issue? Is it from your personal experience? As I've never tried out Qt on Linux I can't tell you, I only...
The GUI xwb was talking of is surely "Visual C++ 2005 Express Edition". It is the free edition of Microsoft's C++ IDE. You can use it from the command line as xwb described it. But writing makefiles that are "eatable" by nmake is painful. If you really want to work from the command line, which...
Does someone know the rules for the C POSIX library? I mean what headers, routines are always availables for C/C++ compilers?
For example <dirent.h> is a POSIX header but is not present in Visual C++ 2005. Another example is stricmp() for which Visual C++ 2005 complains about deprecation(it says...
...or in the main program.
My Singleton class is like this:
template<class G>
class Singleton
{
public:
// Unique instance of type G.
static G* instance ()
{
static G* _instance = Void;
if (_instance == Void)
_instance = new G;
return _instance;
}
};
My problem is...
woja:
This may seem the solution in the sort term. I can't apply it for the moment because the internal representation of Grid<G> is a one-dimensional array, I can't afford to create rows just for the sake of a nice operator.
cpjust:
operator() is a good solution too, and I can apply it...
Hello there,
I have defined a generic class for two-dimensional arrays, called Grid<G>.
I would like to define the operator[] with two arguments, ie the row and the column that define the coordinates of the item to access :
template<class G>
class Grid : public Array<G>
{
// All other...
As far as I know under Windows OSs the home directory of most of the applications is rooted from the user's home directory.
Based on Qt's documentation, the user's home directory can be found like this :
Based on this you can try to call getenv("HOME") to retrieve the current user's home and...
Hello,
You seem to ask for a question related to Qt. I don't know the version you use(3.x or 4.x). With the fourth version, one way is to use the class function QFileDialog::getExistingDirectory().
Look into the documentation at ...
This is not a restriction, as I said you can leave Visual Studio as the central tool but let a qmake-like tool generates when needed the Visual Studio project or a makefile for g++ if you switch to another compiler.
VS 2005 is surely able to generate makefiles, but I don't think it lets you...
Hello PerFnurt,
I do not know if what you asked is possible inside Visual C++ 2005. A priori I believe you cannot. But I have had the same problem as yours with Visual C++ 6, i.e. I don't want my projects to be stuck to a particular building system.
I get rid of this problem thanks to qmake...
You can find C++ libraries where headers have no file extension. STL headers follow this, like <iostream> or <vector> for example. This is also the way trolltech rename headers of Qt4's classes, like <QApplication> or <QTextEdit>. Generally such files are headers aliases.
--
Globos
Hi,
Apparently, you have to declare the destructor of AbstractClass as virtual, so that descendant classes can redefine it.
// the abstract class
class AbstractClass {
public:
virtual ~AbstractClass() {
}
virtual void sayHello() = 0;
};
--
Globos
I don't know a program dedicated to ksh code indentation, but if you have emacs installed you can do this:
Open the script in emacs, type "M-x sh-mode", select the code and type "M-x indent-region"
--
Globos
You can use operator << for that purpose instead of the C printf style :
#include <iostream>
#include <strstream>
using namespace std;
int main ()
{
int intvar = 150;
strstream str_stream;
str_stream << "Message - " << intvar << ", some text";
cout << str_stream.str () << endl...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.