Convert argv to a static string in C, or bug in Visual C++ 2010
===

I want to modify an old C code, that takes inputs from the commandline
to take a constant argv-vektor of strings, defined from inside main.

I get a run-time exception

        //void main(ac,av)
        //char *av[]; 
        void main()
        {
            char *av[]= {"C:\\spice3f5.exe","input.cir","-r","output.txt",0};
            char  **tv;
            tv = av;
            tv++;
            **tv='-';// "Access violation writing location 0x00708edc."
            (*tv)[0] = '-';//Same runtime exception

This simply shouldn't happen...Is it a bug in Visual C++ 2010?

Regards,
Lasse

