I have a big character array. Lets say it contains 4500 bytes.
Case #1:
If I write the following code the complete value is not displayed
cout << filecontent << endl;
Case #2:
In this case, it is working perfectly fine.
for(int i=0; i <= size; i++)
cout << filecontent[i];
My issue is I want to assign the value to Json::Value
. If I do normal assignment operation, it takes only the garbage value.
Why it is so?
As far as my understanding, whenever the actual data contains \0
it treats as the end of the value.
How to overcome this issue?