Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: seek c++ programmer

  1. #1
    Senior Member OpenGL Pro
    Join Date
    Jul 2001
    Location
    France
    Posts
    1,749

    seek c++ programmer

    Does someone has knowledge with templates ?

  2. #2
    Member Regular Contributor nickels's Avatar
    Join Date
    Feb 2000
    Location
    Colorado
    Posts
    298

    Re: seek c++ programmer

    yes.

  3. #3
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,651

    Re: seek c++ programmer

    Do a quick search on google or any other search engine, there are lots of info about it there.

    Mikael

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Jul 2001
    Location
    France
    Posts
    1,749

    Re: seek c++ programmer

    Originally posted by nickels:
    yes.
    hello, i've send you an email, but you seem not having replied.

  5. #5
    Member Regular Contributor nickels's Avatar
    Join Date
    Feb 2000
    Location
    Colorado
    Posts
    298

    Re: seek c++ programmer

    I was just trying to be a funny guy (smart-aleck).

    I do know a lot about templates and can offer answers, but I don't have time to jump aboard your project. Too busy climbing rocks and mountains!

  6. #6
    Senior Member OpenGL Pro
    Join Date
    Jul 2001
    Location
    France
    Posts
    1,749

    Re: seek c++ programmer

    hello.

    OK. you don't need to climb my project. i only wanted to know why my templates are not working as i want.

  7. #7
    Intern Contributor
    Join Date
    Jul 2000
    Posts
    78

    Re: seek c++ programmer

    Well, you may have to be a little more descriptive. I know that I myself am not telepathic so I can't help much at the moment.

    Neil

  8. #8
    Senior Member OpenGL Pro
    Join Date
    Jul 2001
    Location
    France
    Posts
    1,749

    Re: seek c++ programmer

    sorry for the late, but i haven't got the net at home.

    I wanted to make generic template classes to avoid redundant implementation of linked list functionalities. My classes are hierarchic, from one mother class. I use polymorphism.

    my template implementation is something like this:

    template <class O> class list_object
    {
    O *next;
    O *prev;

    list_object( ...)
    };

    template <class O> class list: public list_object
    {
    // i don't remember here
    void AddObject( O data);
    void RemoveObject( O data);
    };

    All seems OK: compilation, linking ( i had errors while linking before, but i correct it). But while executing everything's going bad and worst !

    maybe you'll need to see the code ?

  9. #9
    Member Regular Contributor nickels's Avatar
    Join Date
    Feb 2000
    Location
    Colorado
    Posts
    298

    Re: seek c++ programmer

    Try:

    template <class O> class list: public list_object<O>
    {
    void AddObject( O data);
    void RemoveObject( O data);
    }

    list_object needs to have the template parameter specified.

    DN

  10. #10
    Senior Member OpenGL Pro
    Join Date
    Jul 2001
    Location
    France
    Posts
    1,749

    Re: seek c++ programmer

    first, thanks for your care.
    (sorry if my english not very good)
    But, that's not made any good change.
    now, i have to implement the template methods
    inner the class definition. that's a wrap !
    Now it seems it couldn't create these objects, it seems it overwrite other memory emplacements.
    I may go forward each time i try again, but i think i will never succeed.

    I would like to know: templates seem to not work if there are preprocessor declaration inner the class. But if the preprocessor declaration is inner the class to match, is it not good too ?
    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •