User Profile

Collapse

Profile Sidebar

Collapse
Sandro Bosio
Sandro Bosio
Last Activity: Jul 30 '07, 02:16 PM
Joined: Mar 14 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Sandro Bosio
    replied to Virtual functions clarifications
    in C
    A short reply to some questions (question 3 is quite long to be properly answered, and you can find good explanations both on the web and on books).

    1) Your answer is right. And you can use only static and local variables within a static function.

    2) Yes, they are class members. But you just have to try to find out.

    3) Short answer: they are functions which a derived class can redefine. Then at runtime...
    See more | Go to post

    Leave a comment:


  • Sandro Bosio
    replied to code
    in C
    Indeed the declaration of srand in stdlib.h is void srand(unsigned) , and not int srand(unsigned) , so this code does not compile to me.



    which is obviously to obtain a random number between 1 and 100, which as noticed will not be so random after all.

    Sandro...
    See more | Go to post

    Leave a comment:


  • Sandro Bosio
    replied to Wrong static initialization order
    in C
    This is an update on my own message.

    First forget about the fact that I cannot register the initializer from the constructor of the base class ParametersIniti alizer. Indeed now I do, I don't know why I had problems with virtual functions before (but I had them), now they seem to have disappeared.

    I found out that having the PointerList object as a static member of ParametersIniti alizer partially solves the issue. Doing...
    See more | Go to post

    Leave a comment:


  • Sandro Bosio
    started a topic Wrong static initialization order
    in C

    Wrong static initialization order

    Hello everybody, my first message on this forum. I tried to solve my issue by reading other similar posts, but I didn't succeed. And forgive me if this mail is so long.

    I'm trying to achieve the following (with incomplete succes): I want in a given namespace Parameters a list of "initialize rs" (which are objects derived from a simple interface that can be implemented anywhere, and are used to define which parameters the program...
    See more | Go to post
    Last edited by horace1; Mar 14 '07, 03:46 PM. Reason: added code tags
No activity results to display
Show More
Working...