Getting multiple lines of input with scanf() in c -


i trying grab multiple lines of input scanf, lines have same formatting example line:

1, 05:05:04, 1, 1103

the current code have grabs 1 line

scanf(" %d, %d:%d:%d, %d, %d", int1, int2, int3, int4, int5, int6); 

are looking this?

while (scanf("%d,%d:%d:%d,%d,%d",            &int1, &int2, &int3, &int4, &int5, &int6) == 6) {     //use int1, int2, int3, int4, int5, int6 }    

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -