Results 1 to 2 of 2

Thread: Random Generator for Androidx86 in Qt5

  1. #1
    Join Date
    Sep 2014
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Random Generator for Androidx86 in Qt5

    hi,
    I made a prog which uses a random generator like srand(time(0)); and rand().
    This works fine under win7 but the target-system is android but it doesn't work on it.
    The app starts but there are no random numbers.
    It seems to return '0' (zero) all the time!

    Does anyone know how I can create random numbers under android?
    It's a simple app, so it don't have to the best/complex generator.

    P.S.
    This is my first Qwidget-prog and my first useable c++ prog.
    So please explain complex syntax.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Random Generator for Androidx86 in Qt5

    You could check if qsrand() and qrand() have the necessary adaptions for work on Android.

    Cheers,
    _

Similar Threads

  1. Report generator
    By mak_user in forum General Programming
    Replies: 6
    Last Post: 13th October 2015, 11:36
  2. Flowchart generator
    By reversevendingman in forum Newbie
    Replies: 5
    Last Post: 19th March 2013, 23:23
  3. code generator failed
    By nickson1277 in forum Newbie
    Replies: 1
    Last Post: 13th March 2012, 21:48
  4. Replies: 1
    Last Post: 7th April 2010, 16:26
  5. Random No Generator in C/C++
    By ankurjain in forum General Programming
    Replies: 1
    Last Post: 6th July 2006, 11:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.