I have below class
class Cdata12Mnt
{
public:
char IOBname[ID1_IOB_PIOTSUP-ID1_IOB_TOP][BOADNAM_MAX + 4];
char ExIOBname[ID1_MAX_INF-ID1_EXIOB_U1TOP]
The error says that a warning was treated as an error. Therefore your problem is a warning message! Check them and fix these.
In case you don't know how to find them: Open the Error List (View > Error List) and click on Warning.
This warning is about unsafe use of strcpy. Try IOBname[ii]='\0'; instead.
Go to project properties -> configurations properties -> C/C++ -> treats warning as error -> No (/WX-).
As a side-note, you can enable/disable individual warnings using #pragma. You can have a look at the documentation here
From the documentation:
// pragma_warning.cpp
// compile with: /W1
#pragma warning(disable:4700)
void Test() {
int x;
int y = x; // no C4700 here
#pragma warning(default:4700) // C4700 enabled after Test ends
}
int main() {
int x;
int y = x; // C4700
}
This error message is very confusing. I just fixed the other 'warnings' in my project and I really had only one (simple one):
warning C4101: 'i': unreferenced local variable
After I commented this unused i, and compiled it, the other error went away.