I am writing some unit tests and would like to be able to assign values to argc & argv in the code, rather than pass them through the command line.
I have tried
However within prog_main it uses
which gives the following error:
First-chance exception at 0x00615505 in unit_test.exe: 0xC0000005: Access violation writing location 0x006551a8.
Any thoughts?
Thanks
Laura
I have tried
Code:
int argc = 4;
char* argv[] = {"prog_main", "str1=data", "ps=Y", "file=hj.srt"};
prog_main(argc, argv);
However within prog_main it uses
Code:
memset(argv[i],'\0',(int)strlen(argv[i]));
which gives the following error:
First-chance exception at 0x00615505 in unit_test.exe: 0xC0000005: Access violation writing location 0x006551a8.
Any thoughts?
Thanks
Laura