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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by globos

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

Part and Inventory Search

Back
Top