Search:

Type: Posts; User: cagney58

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    9,542

    I tried: printf("my_envp is now: %s\n",...

    I tried:



    printf("my_envp is now: %s\n", &my_envp[4]);


    to see what you were talking about and my output was: Ø`¨¸Ðð(P¨ÀÐè²

    I'm obviously not getting the logic behind it. Could you...
  2. Replies
    5
    Views
    9,542

    Delete first 4 chars in char array

    I'm trying to cut the first 4 chars (PWD=) of the environment variable, my_envp[0], which in this instance is "PWD=/home/usrnm/cprgms/project"
    This is my attempt:



    char pwd[] = "PWD=";...
Results 1 to 2 of 2