#9 int randi(int, int) does not work

release_3.6.x
closed
None
5
2012-09-15
2002-03-01
Anonymous
No

When using the "int randi(int,int)" function the
following error message occurs:

call of overloaded `randi (int, int)' is ambiguous
include/base/random.h:583: candidates are: int
randi(int = 3, int = 0)
include/base/random.h:585: class ivec
randi(int, int = 3, int = 0)

//Pĺl F

Discussion

  • Pĺl Frenger
    Pĺl Frenger
    2002-03-07

    Logged In: YES
    user_id=353760

    Possible solution:
    Remove the default values of the arguments.
    //Pl F

     
  • Logged In: YES
    user_id=326034

    The randi() functions are removed from version 3.6.5, but
    will most likely reappear in version 3.7.0 in slightly
    changed form.