3
I have a C application. It already opens a text file and reads the whole single line that the file has. It’s a long line, for example: Htjxxxxxxxxxxxxxxxxx...
I can store this content of the text file in a variable.
But how do I read the first three characters only?
I need to read only the first three to create a condition that compares them with other values.
In Javascript it would be something like:
if(linha.substr(0, 2) === "HTJ")
{
// Condição
}
Thanks in advance!