Hi,
Here is my input from a file:
------------------------------------
Other Names=Andrew
-----------------------------------
i want to divide the string into 2 parts"
header = "Other Names"
content= "Andrew"
Here is my code:
<code>
while ((fgets(line, sizeof(line), fp)) != NULL)
{
sscanf(line,"%s=%s\n", header, content);
printf("%s\n", header);
}
</code>
However, the output is:
header = "Other"
content = some rubbish
What could be the problem?
Thanks