06-08-2007, 21:42
|
|
|
|
חבר מתאריך: 17.09.05
הודעות: 6,023
|
|
בבקשההה תעזרו לי ...
הסבר:
בהתחלה הצהרה על המערכים (יש 2 כאלה)
אחר כך קריאות והצהרות על הפונקציות
אחר כך הקצאה והכנסה ראשונית של פרטים למערכים
קוד:
char** arrVariables=NULL; // array of the variable's names
char** arrVariablesContents=NULL; // array of the variable's contents.
קוד:
openCommands(command,len,&arrVariables,&arrVariablesContents);
int openCommands(char** command,int len,char*** arrVariables,char*** arrVariablesContents)
קוד:
InsertVariable(command[1],command[3], arrVariables, arrVariablesContents);
int InsertVariable(char* Vname,char* con,char*** arrVariables, char*** arrVariablesContents)
קוד:
if(VariablesLEN==0)
{
arrVariables=(char***)malloc(sizeof(char**));
arrVariablesContents=(char***)malloc(sizeof(char** ));
*arrVariables=(char**)malloc(sizeof(char*)*1);
*arrVariablesContents=(char**)malloc(sizeof(char*) *1);
*(arrVariables)[0]=strdup(Vname);
*(arrVariablesContents)[0]=strdup(con);
return 1;
}
תודה רבה רבה רבה לעוזרים
_____________________________________
|