For integer input you can do this.
for (int i = 0; i < count; i++) {
scanf("%d,", &storage[i]);
}
Is there a way to read string input separated by comma too? example. string1, string2, string3
Below doesn't seem to work or am i missing something?
for (int i = 0; i < count; i++) {
scanf("%s,", storage[i]);
}
We haven't touch using strtok yet, so I might be questioned why I use it. It is working on integer inputs so I am wondering if it is also possible for string inputs automatically separating them. So I guess I have to read the string inputs 1 by 1 then.