Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • You could make Random() non-const. Commented Feb 15, 2011 at 19:30
  • I would like to but Random() is legacy code that I can't really touch. Commented Feb 15, 2011 at 19:31
  • 1
    Is that 4 chosen with an unbiased dice (thus making it really random). Commented Feb 15, 2011 at 19:49
  • looking at the error message, I wander perhaps your problem is elsewhere? Note the "passing const int as 'this'". Sounds weird perhaps the 4 argument is interpreted as this? why? Commented Feb 15, 2011 at 19:50
  • 1
    The question is not how many functions will have to be declared const, but whether those functions are actually const: do they modify any member of the object? If not, then mark them as const. Commented Feb 15, 2011 at 19:57