Not coding in C++ right now but a question came up when I have a question in C#. Hope experts here can easily give a anwser.
Class A{
#ifdef AFlag
public void methodA(){...}
#endif
}
Class B{
...
A a;
a.methodA();
...
}
Class C {
...
A a;
a.methodA();
...
}
If the AFlag is NOT defined anywhere, what will happen? A compile error or no error but the methodA AND those statements calling that method will not be compiled?
thanks
There will be a compile error.