Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_pre.php on line 387

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_pre.php on line 387

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_seo.php on line 337

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_seo.php on line 339

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_seo.php on line 341

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_seo.php on line 343
Order Gen

Results 1 to 9 of 9

Thread: Order Gen

  1. #1
    Semi-Coder
    Join Date
    Jun 2007
    Posts
    1,012

    Order Gen

    how would i make a program in c++
    to do an order like this
    a,b,c,d,e,f
    aa,ab,ac,ad
    ba,bb,bc,bd??
    to go threw every word and everything possable

  2. #2
    VIP null's Avatar
    Join Date
    Apr 2006
    Posts
    1,796

    Re: Order Gen

    er.. you could make a char array, start at [0] then add ++ till you get to z ascii.. then once you get there reset it to 0 and move to [1] and do the same, etcetc.. but it would take a very long time.

  3. #3
    Site Admin xHalt's Avatar
    Join Date
    May 2006
    Location
    Belgium
    Posts
    8,202

    Re: Order Gen

    Quote Originally Posted by thor View Post
    how would i make a program in c++
    to do an order like this
    a,b,c,d,e,f
    aa,ab,ac,ad
    ba,bb,bc,bd??
    to go threw every word and everything possable
    I'll make it in java, but you'll get the idea, it's fairly easy.

    Make a column that contains those elements, let's say array = [a,b,c,d,e,f]
    Create an integer n = 0;
    Then you write a while loop
    Code:
    while (n<array.getlength()){
    System.Out.Println(array.getElementAt(n) + ', ');
    n++;
    }
    (Notice the length of the column is 6 while the position of the last element is 5.
    Will give you: a,b,c,d,e,f.

    If you want aa,ab,ac,ad, ... you simply use two while loops.

    Code:
    int m = 0;
    int n = 0;
    while (m<array.getlength()){   
       while (n<array.getlength()){
       System.Out.Println(array.getElementAt(m) + array.getElementAt(n) + ', ');
       n++;
        }
    m++;
    }

  4. #4
    Semi-Coder
    Join Date
    Jun 2007
    Posts
    1,012

    Re: Order Gen

    that is java thats very close to c++ ty ill try it in 5 min

    how would i do like

    a if correct stop
    if not correct
    b go threw the whole one char list
    then go to 2 char then 3 and so on intill it is correct

  5. #5
    Coders NightGhost's Avatar
    Join Date
    Apr 2006
    Posts
    658

    Re: Order Gen

    You wont need to do that yourself: just google for "bruteforce generator".

    But if you still want to do that:

    Code:
    char firstone[26] = "abcdefghijklmnopqrstuvwxyz";
    char secondone[26][26];
    
    main()
    {
    int i;
    int b;
    
    while (i < 26)
    {
     while(b < 26)
      {
        secondone[i][b] = firstone[b];
        b++;
      }
      i++;
      b = 0; //reset b, new thingy
    }
    
    }

  6. #6
    Semi-Coder
    Join Date
    Jun 2007
    Posts
    1,012

    Re: Order Gen

    initializer-string for array of chars is too long???
    right here
    char firstone[26] = "abcdefghijklmnopqrstuvwxyz";
    char is onlyone char but u have the [26]
    what do i do?

  7. #7
    Coders NightGhost's Avatar
    Join Date
    Apr 2006
    Posts
    658

    Re: Order Gen

    its an array : try 25, i think i didnt calculate that [0] with it >:.

  8. #8
    Semi-Coder
    Join Date
    Jun 2007
    Posts
    1,012

    Re: Order Gen

    right now i have
    i know what that error is but what other way can you make this program? so it will work and not be huge?
    initializer-string for array of chars is too long


    char firstone[25] = "abcdefghijklmnopqrstuvwxyz";
    char secondone[25][25];

    main()
    {
    int i = 0;
    int b = 0;

    while (i < 25)
    {
    while(b < 25)
    {
    secondone[i][b] = firstone[b];
    b++;
    }
    i++;
    b = 0; //reset b, new thingy
    }

    }

  9. #9
    Semi-Coder
    Join Date
    Jun 2007
    Posts
    1,012

    Re: Order Gen

    well today im going to remake this from scratch and use numbers with it like
    if (a=1 || A=1)
    like that but im going to make it after i find out how to run it with the cod2 console

Similar Threads

  1. [order] Cod 2 1.3
    By mucufa1 in forum Call of Duty 2 Cheats
    Replies: 6
    Last Post: July 29th, 2008, 07: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
  •