Click here to Skip to main content
12,070,942 members (65,324 online)

C / C++ / MFC

 
AnswerRe: Long pointer to character C++ Pin
CPallini28-Nov-12 8:48
mvpCPallini28-Nov-12 8:48 
AnswerRe: Long pointer to character C++ Pin
sajeesh.c30-Nov-12 19:35
membersajeesh.c30-Nov-12 19:35 
AnswerRe: Long pointer to character C++ Pin
April Fans13-Dec-12 19:06
memberApril Fans13-Dec-12 19:06 
Questionproblem in c with linux Pin
a1_shay28-Nov-12 3:23
membera1_shay28-Nov-12 3:23 
i need to make program that i give some system command like ls,date et cetera.and to check if thre is path that include this command(file).i have variable commandandparameters that start to change in the last loop while and i dont know why.
i put puts(commandandparameters); to show that the output is not good if you want to run it.
#include
#include
#include
void main()
{
char *arr[5];//for the command and his parameter
char command[10];
int i,j;
char *path=NULL,*tempath,*finalpath,*commandandparameters;
do
{
i=0;
printf("enter new command:");
gets(command);
arr[i]=strtok(command," ");
while(arr[i]!=NULL)//save the command and also the parametrs
{
i++;
arr[i]=strtok(NULL," ");
}
strcpy(commandandparameters,arr[0]);//add first command
for(j=1;j
AnswerRe: problem in c with linux Pin
CPallini28-Nov-12 4:07
mvpCPallini28-Nov-12 4:07 
SuggestionRe: problem in c with linux Pin
Richard MacCutchan28-Nov-12 4:11
mvpRichard MacCutchan28-Nov-12 4:11 
GeneralRe: problem in c with linux Pin
a1_shay28-Nov-12 22:35
membera1_shay28-Nov-12 22:35 
GeneralRe: problem in c with linux Pin
Richard MacCutchan29-Nov-12 0:04
mvpRichard MacCutchan29-Nov-12 0:04 
AnswerRe: problem in c with linux Pin
sajeesh.c30-Nov-12 19:40
membersajeesh.c30-Nov-12 19:40 
QuestionMerging Arrays Pin
pix_programmer27-Nov-12 22:57
memberpix_programmer27-Nov-12 22:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.160208.1 | Last Updated 10 Feb 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid