I'm trying to add an integer to a string. So it's something like this:
pass_value = m + ";" + v1 + ";" + v2 + ";" + v3 + ";" + v4
output would be:
2;23;21;53;34
But that doesn't work. Can you help me, please?
Integers and strings are two different types in C, and there is no way to add them, from your description, what you need is sprintf which will print the integers into a string buffer:
int m, v1, v2, v3, v4;
// do some computes for the integers
char str[512];
snprintf(str, sizeof str, "%d;%d;%d;%d;%d", m, v1, v2, v3, v4);
printf("result is %s\n", str);