Search:

Type: Posts; User: nonpuz

Search: Search took 0.02 seconds.

  1. Replies
    15
    Views
    1,768

    Actually what you need to have is this: ...

    Actually what you need to have is this:


    recursive(str, ++k);


    That allows the recursive algorithm to "progress". Of course it still doesn't actually print the permutations because your flip...
  2. Replies
    15
    Views
    1,768

    Yeah there seems to be a number of...

    Yeah there seems to be a number of problems....you are running out the stack because the recursion never progresses, so eventually it simply segfaults because it can't locate the address of the...
  3. Replies
    15
    Views
    1,768

    Ok, well the point is you are trying to modify a...

    Ok, well the point is you are trying to modify a STRING LITERAL. In C you can not modify a string when it is declared like this:

    char * s = "string";

    You can only modify a string that has been...
  4. Replies
    15
    Views
    1,768

    Define your string here: char* cat =...

    Define your string here:


    char* cat = "cat";


    Like this:


    const char * cat = "cat";
Results 1 to 4 of 4