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("Option :t is introduce\n"
iErr = 1;
}
break;
case 'T':
{
printf("Option :T is introduce\n"
iErr = 2;
}
break;
default :
printf("Nothing\n"
iErr = 0;
}
}
else
{
printf("Nothing\n"
iErr = 0;
}
}
return iErr;
}
Can you help me ?
Best Regards
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("Option :t is introduce\n"
iErr = 1;
}
break;
case 'T':
{
printf("Option :T is introduce\n"
iErr = 2;
}
break;
default :
printf("Nothing\n"
iErr = 0;
}
}
else
{
printf("Nothing\n"
iErr = 0;
}
}
return iErr;
}
Can you help me ?
Best Regards