Solution :
I had also faced the similar issue in the recent past. I did lot of research on it and found the solution on it. This is the very common problem with the people getting started.
I must tell you that C functions are not acquainted with the C++ structures. You should do as the below:
...
for(j = 0; j < 6;j++) {
printf("Input your number for %s =", qr_naziv[j].c_str());
scanf("%d", &br_el[j]);
}
...
Please notice the call to your method c_str()
on a each std::string qr_naziv[j]
, which returns the const char *
to the null-terminated character array with the data equivalent to those stored in a string -- a C-like string.
If you follow the solution then your issue will be resolved.