Search:

Type: Posts; User: MarkZWEERS

Page 1 of 11 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    917

    Yeah, that must be it, thanks a lot ! Yeah...

    Yeah, that must be it, thanks a lot !



    Yeah that's my plan, but for now that's not yet possible. How to convince my boss that we should put some effort in organizing our code and make good...
  2. Replies
    3
    Views
    917

    Visual Studio 2008 config problem

    Hi everyone,

    The application I develop consists of several computational models, each of them represented by a specific class ("class alpha", "class beta", "class gamma") derived from "class...
  3. Replies
    3
    Views
    1,325

    Stack corruption ?

    Hi everyone,

    Now every error seems weird, but this one _really_ does to me ;-)

    I have to classes, A and B. B is an interface for let's say B_a and B_b.
    'A' contains a pointer to 'B',...
  4. eureka ! First I need to indicate an explicit...

    eureka !

    First I need to indicate an explicit specialization for the class, then for the function. This works :



    template<>
    template<> /// < ---
    void A<int> :: f<double> (double&...
  5. Nope, T should match double'. But you're right, i...

    Nope, T should match double'. But you're right, i forgot to specialize f's parameter.

    I've corrected my post, but it doesn't compile. g++ sais :

    new.cpp:67: error: template-id ‘f<double>’ for...
  6. Explicit specialisation of function template as member of class template

    Hi,

    How on earth do I explicitely specialize :


    template<typename U>
    class A {
    public:
    template<typename T> void f(T& v)
    {
  7. Replies
    1
    Views
    1,788

    Barton-Nackman trick (?)

    Hi guys & girls,

    I do have the following question. Let's say I have a skeleton for some functionality, which I want to implement in different ways. One way is the Template pattern, but that uses a...
  8. Replies
    7
    Views
    891

    The problem seems to be solved by a (more than...

    The problem seems to be solved by a (more than necessary) reorganization of the code files.

    But honestly, it cannot be a complex #include spaghetti which makes the debugger fail ?!

    At least tnx...
  9. Replies
    7
    Views
    891

    VisualStudio 2008 : version 9.307... (SP) . See...

    VisualStudio 2008 : version 9.307... (SP) . See the attached file for precise version info.

    In the mean time, I also tried to look at the '.i' file, i.e., the intermediate file generated by the...
  10. Replies
    7
    Views
    891

    Yeah already did couple of times. Even changed...

    Yeah already did couple of times. Even changed name of files, .lib (created) etc.


    When i take a look at the disassembled code, I notice that (with the function causing my troubles) there is a...
  11. Replies
    7
    Views
    891

    Visual Studio C++ debugging

    Hi guys,

    I'm having this very weird problem : I compile my code and create the executable with all debug options 'on' (.pdb file is written) , then I launch the executable and debug my code.
    At a...
  12. If the class std::string is implemented following...

    If the class std::string is implemented following the COW philosophy it doesn't create a copy unless you modify the string. But I'm not sure if the string class is always implemented that way.
  13. Replies
    4
    Views
    1,246

    segmentation fault due to "printf" ?

    Hi everyone!

    During a debug of an existing program, the following occurs :


    printf( "blabla ", argv[1]) ; // argv[1] is the argument of 'main'
    ret=geo->load(argv[1]);


    now, at time of...
  14. Thread: strrchr

    by MarkZWEERS
    Replies
    1
    Views
    1,149

    strrchr

    Hi everyone,

    Does anyone know why the old C function "strrchr" has been implemented in C++ as



    const char * strrchr ( const char * str, int character );
    char * strrchr ( char *...
  15. Replies
    4
    Views
    1,020

    A::Update() will only be called in A's member...

    A::Update() will only be called in A's member functions.
  16. Replies
    4
    Views
    1,020

    Protected purely virtual function

    Hi,

    Trying to generalize behaviour of a set of classes and to supply them with decorators, I'm implementing an abstract interface containing the common functions.

    Now all my classes have a...
  17. Thread: Decorator

    by MarkZWEERS
    Replies
    8
    Views
    962

    OK thanks, then I'll try to solve that one first...

    OK thanks, then I'll try to solve that one first :-)
  18. Thread: Decorator

    by MarkZWEERS
    Replies
    8
    Views
    962

    Hi, That's exactly my problem : the actual...

    Hi,


    That's exactly my problem : the actual class hasn't got a proper interface.

    In the file tmp.png I've included the UML diagram :

    - "Component", "Composite", "DerivedComposite" are...
  19. Thread: Decorator

    by MarkZWEERS
    Replies
    8
    Views
    962

    This what I've found in the GoF "Design Patterns"...

    This what I've found in the GoF "Design Patterns" :



    So basically after having decorated my component, I want my component itself to become the decorated version.



    class Component {
    ...
  20. Thread: Decorator

    by MarkZWEERS
    Replies
    8
    Views
    962

    But the decorator is a wrapper of an object ? If...

    But the decorator is a wrapper of an object ? If I don't re-define the virtual functions in that wrapper, I can not use the wrap-object instead of the wrapped object. That's what I want : add some...
  21. Thread: Decorator

    by MarkZWEERS
    Replies
    8
    Views
    962

    Decorator

    Hi,

    To clean up a class which contains too many fonctions and attributes, I want to implement decorators for that class.
    However, the class contains many virtual functions.

    If I understood...
  22. Replies
    4
    Views
    973

    OK, thanks !

    OK, thanks !
  23. Replies
    4
    Views
    973

    C++ style tables

    Hi everybody!

    The project I'm working on contains a lot of tables, which are now defined as pointer-type arrays :


    typedef struct {
    string name;
    double value;
    int multiplicity;
    }...
  24. Replies
    9
    Views
    5,397

    Then at that higher lever it is decided which...

    Then at that higher lever it is decided which Visitor is being accepted by which Element.

    It seems more logical to me. The actor decides on which object the action applies, then the actee accepts....
  25. Replies
    9
    Views
    5,397

    you mean the Visitor initiating the action to...

    you mean the Visitor initiating the action to visit an element...



    void myElement :: foo(bool i)
    {
    if (i) {
    initVisitor initializer;
    initializer.Visit(this);
    }
Results 1 to 25 of 251
Page 1 of 11 1 2 3 4