If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Before fixing the "convert" error you first have to fix your other problem: you are trying to access the first element of the char *sss[] array while this array is empty (there is not any element at all!)

Re: error C2440: '=' : cannot convert from 'const char *' to 'char *

Actually this is my code: I use command line argument, argv[1] is my one of the input file name. I want to change argv[2] and argv[3] dynamically inside the for loop.

First, use code tags when posting code. The code you posted is practically unreadable.

Second, you should not be attempting to change argv[] directly. Just copy the values of argv[] to your own local string variables and manipulate those local strings. There is no guarantee that argv[] is modifiable, and even they are modifiable by chance, modifying them is undefined behaviour.

Here you need to understand what is the difference between the following definitions in C/C++:

Code:

char* sss0[ ]; // this just defines a pointer to an array of char*of unknown size, results in no array allocation!
char* sss1[1]; // this defines an array of char* of size 1, results in array allocation

Second error means that pointer to non-constant string is assigned with address pointing to constant string. Using non-constant pointer to constant memory may result in constant object being modified, which conflicts with meaning of being constant. No such conversion exists that would keep the referred object be constant. Therefore you need to explicitly make a modifiable object copy instead of casting pointers. Or make the lvalue be of the type compatible with the type of rvalue.