I am trying to get use sscanf to scan a string of text and store the values into an array. When it comes to storing the last string it stops scanning when it comes to a white space. For example in the below string it would only store the word "STRING". I have tried using %[^ \t\n] and the other various specifiers but it seems I am missing something.
I just cant get the function to include white space, im sure its probably something simple.
string test = "9999:STRING OF TEXT";
scan = sscanf(test, "%d:%s", rec[i].ref, rec[i].string);