Ok - bit new to C - all I want to do is check if a char* is empty or null, in this case I'm checking *roadNumber. It keeps crashing when I run the code saying - "The instruction at blah de blah...The memory could not be read" - so I take it there is some conflict with two variables or something...
If anyone can help that would be great.
(BTW - the code is a conditional statement to transfer the contents from a char* to a char array, if roadNumber is empty do this bit of code, else do the other).
Code:
if (roadNumber = NULL)
{
for(i=0;i<length;i++)
{
oneRoadName[i] = propRoadName[i];
}
}
else
{
for(i=0;i<length;i++)
{
oneRoadName[i] = roadNumber[i];
}
}