LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   I got a question about inserting char arrays into a string... (https://www.linuxquestions.org/questions/programming-9/i-got-a-question-about-inserting-char-arrays-into-a-string-876220/)

trist007 04-20-2011 06:10 PM

I got a question about inserting char arrays into a string...
 
For example say I have the following code in C.
Code:

char user[32] = "william";
.
.
.
execlp("echo", "echo", "Hello user", NULL);

How would I have william be inserted into user on the execlp line?

trist007 04-20-2011 06:21 PM

Ah I got it, just inserted it as another argument.


All times are GMT -5. The time now is 09:59 PM.