c - How do i count the number of elements on a given line of a file? -
something along line of:
int n = sscanf(%s %s ...
it save how many string element on given line in int n,
the file can contain many lines each line having many elements e.g.
efefefef efefef dfefe fefef eef efef efef efefef efefef efefef efefe efeefef [wdfefefef]
first line n = 2 ; second line n = 6
also how should remove brackets strings thr string inside bracket?
regards
presuming 'element' mean word, best bet use strtok
, pass appropriate list of terminators (which include space, '[', ']', etc.
Comments
Post a Comment