Search code examples
cpointerscastingwarningsblock

c- assignment makes integer from pointer without a cast


I got a warning:

assignment makes integer from pointer without a cast.

The line that triggers the warning is:

nev[i][0]="";

The nev variable is a 2 dimension char block(please don't ask why, I don't know).

Thanks in advance guys!


Solution

  • If nev is a 2-dimensional array of char, then nev[i][0] is a char. But "" is an array of char, not a char. – Barmar

    nev[i][0]=""; --> nev[i][0]=0; – BLUEPIXY