I've got a file with data to read into a program where the fields are enclosed by []. I thought that
sscanf(ques, "[%s]", ques);
should work to trim the brackets off as far as I'm aware, but it only trims off the leading [ not the trailing ]. Is this because [] is used in the sscanf formatting or is there some other reason? I've tried changing to {} and () and those did exactly the same.
Help!
sscanf(ques, "[%s]", ques);
should work to trim the brackets off as far as I'm aware, but it only trims off the leading [ not the trailing ]. Is this because [] is used in the sscanf formatting or is there some other reason? I've tried changing to {} and () and those did exactly the same.
Help!
Comment