Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

An exe script in C++

Status
Not open for further replies.

youssef

Programmer
Mar 13, 2001
96
BE
Hi,

I would like to create a script in C++ for introduce some datas into a executale.


For example : senddata /p test /r test1.

I create a little sample and after I execute my script, the prompt message is closed and I can't see the result.

My sample:


int main(int argc, char* argv[])
{
printf("Hello World!\n");

char *p;
int i;
int iErr;


for (i=1; i<argc;i++)
{
p=argv;
if(*p=='/')
{
p++;
switch(*p)
{
case 't':
{
printf(&quot;Option :t is introduce\n&quot;);
iErr = 1;
}
break;

case 'T':
{
printf(&quot;Option :T is introduce\n&quot;);
iErr = 2;
}
break;
default :
printf(&quot;Nothing\n&quot;);
iErr = 0;
}
}
else
{
printf(&quot;Nothing\n&quot;);
iErr = 0;
}
}

return iErr;
}



Can you help me ?

Best Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top