Hi there,
I am trying to compare two strings. But I am not able to do so. I use
:
if(function_nam e[function_number] == function_label[k]){
but this does not work.
I have written down my code:
const char *function_name[(code_addr_t)co de_size];
string function_label[(code_addr_t)co de_size];
int function_number = 0;
int i = 0;
ifstream inputStream("no _args.txt");
if(!inputStream )
die();
while(!inputStr eam.eof())
{
getline(inputSt ream,funcName);
i++;
function_label[i] = funcName;
}
int tot_func = i;
function_number = function_number + 1;
function_name[function_number] = "sumarray";
for(int k = 1; k <=tot_func;k++) {
if(function_nam e[function_number] == function_label[k]){
printf("inside if\n");
}
The execution never enters inside the if { printf("insde if\n");
Thank you in advance,