Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


- - - - -

Two Arrays


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 povilaslt2   Members   -  Reputation: 235

Like
0Likes
Like

Posted 13 August 2013 - 04:08 AM

Hey there, i have problem. I have 2 arrays and i want to get all possible combinations with these two arrays. For example: mUtrucu6. Can you help me?

                char[] charactersToTest =
                {
                    'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
                    'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
                    'u', 'v', 'w', 'x', 'y', 'z','A','B','C','D','E',
                    'F','G','H','I','J','K','L','M','N','O','P','Q','R',
                    'S','T','U','V','W','X','Y','Z',
                };
                char[] charactersToTest =
                {
                    '1','2','3','4','5','6','7','8','9','0'
                };

Edited by povilaslt2, 13 August 2013 - 04:08 AM.


Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3413

Like
0Likes
Like

Posted 13 August 2013 - 11:43 AM

All possible combinations would give an infinite set of strings, unless you put some restrictions on the valid combinations.

 

I would recommend looking up algorithms on computing possible permutations on a given set of data.

 

What do you need this for?


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS