Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. globos

    Mixed columns design problem

    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...
  2. globos

    Logging

    As C++ is your language, why not use log4cxx ? http://logging.apache.org/log4cxx/index.html -- Globos
  3. globos

    Strange compilation error with a template member method

    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...
  4. globos

    Strange compilation error with a template member method

    Hi all, I get a compilation error with this source code (simplified to isolate the problem) : struct VirtualTable { template<typename _FUNC_> void add() { } }; // struct VirtualTable template<typename _T_> struct functor { private: VirtualTable* _vtable; public...
  5. globos

    Compiling/Running via DOS

    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...
  6. globos

    Compiling/Running via DOS

    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...
  7. globos

    POSIX routines

    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...
  8. globos

    Shared Singleton across DLLs

    Hello, I would like to have a Singleton class that ensures to have only one instance wherever the code flow is in a DLL 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 () {...
  9. globos

    Operator[ ] with two arguments

    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...
  10. globos

    Operator[ ] with two arguments

    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...
  11. globos

    membervar as array in astruct

    This should work : #include <string.h> typedef enum{ DIES,DAS }MessageType; typedef struct{MessageType type; unsigned long data[32]; }TriggerData; int main(int argc, char* argv[]) { TriggerData sValue; unsigned long filled_data[32] = {...
  12. globos

    how to get the Home directory

    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...
  13. globos

    Problem with templates and inheritance

    Hi, Please try to compile this code : template<class G, class H> class Table { public: virtual const G& item (const H& k) const = 0; }; template<class G> class Indexable : public Table<G, int> { public: //virtual const G& item (const int& k) const = 0; virtual const G& i_th (int i)...
  14. globos

    saving into a directory

    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 ...
  15. globos

    Multiple platform builds

    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...
  16. globos

    Multiple platform builds

    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...
  17. globos

    File name ending...

    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
  18. globos

    Abstract class destructor not called

    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
  19. globos

    code beautifier

    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
  20. globos

    Variable Arguments by overloading &lt;&lt; with a seperate argument.

    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...

Part and Inventory Search

Back
Top