CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    How to Generate a random string, please help

    Hi, I need a random string, I want every user when saving data, the name of the
    file is like this: resultXXXX.txt, I need to concatenate XXXX to "result" and "txt",
    Regards



  2. #2
    Join Date
    Jul 1999
    Location
    Belarus, Minsk
    Posts
    44

    Re: How to Generate a random string, please help


    java.util.Random rnd = new Random( 12345 );
    String szRand = new Integer( rnd.nextInt() ).toString();
    String szFileName = "result" + szRand + ".txt";




    SY, SkyM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured