scanf - How to read integers with sscanf separated by symbols in C? -


so have string following value

[7, 8]

now wan't store each value (only numbers) in 2d array [1][2].
i'm pretty sure using sscanf best way this, how tell sccanf read integers?

thanks in advance

sscanf("[%d,%d]", array[a][b], array[c][d]); 

Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -