O
Old Wolf
On one particular compiler, this program fails to compile because
memset is an undeclared symbol (it's in namespace std but not in
the global namespace):
#include <cstring>
#include <string.h>
int main()
{
char a[10];
memset(&a, '\0', 10);
return 0;
}
But if the first line is removed then the program compiles.
Apparently what is happening is that the include guards activated
by <cstring> mean that the second include is ignored.
Should this be considered a compiler bug?
memset is an undeclared symbol (it's in namespace std but not in
the global namespace):
#include <cstring>
#include <string.h>
int main()
{
char a[10];
memset(&a, '\0', 10);
return 0;
}
But if the first line is removed then the program compiles.
Apparently what is happening is that the include guards activated
by <cstring> mean that the second include is ignored.
Should this be considered a compiler bug?