#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2007
    Posts
    33
    Rep Power
    7

    Initialize Variable


    This forum seems pretty empty, but thought I'd ask anyways. I just created a view based application, and I want to initialze a varibale upon the application launching.

    So:

    int r = arc4random() % 74;

    The problem is, the number needs to be random every time the app is launched. I was wondering where the proper place to declare such a variable would be.

    Thanks!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    157
    Rep Power
    0
    I would say initialize it right before you need it. Is there some problem that you've encountered that prevents this?
    Write multiplayer games with FlashMOG 0.3.1
    Try the MyPlan Salary Calculator
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2010
    Posts
    1
    Rep Power
    0

    hay


    Originally Posted by Wayfarer247
    This forum seems pretty empty, but thought I'd ask anyways. I just created a view based application, and I want to initialze a varibale upon the application launching.

    So:

    int r = arc4random() % 74;

    The problem is, the number needs to be random every time the app is launched. I was wondering where the proper place to declare such a variable would be.

    Thanks!
    I want to know that in which programming language you are using this integer function.
    tell me the name of the language then it will be easy to get through this problem

    cheers

IMN logo majestic logo threadwatch logo seochat tools logo