I am attempting to compile a simple C++ program (see below), and I keep getting numerous error messages.
#include <iostream>
int main (int argc, char * const argv[]) {
std::cout << "Hello, World!\n";
return 0;
} The problem seems to be with the #include <iostream> statement. The errors begin as follows:
error: '::memcpy' has not been declared
error: '::memmove' has not been declared
error: '::strcpy' has not been declared
error: '::strncpy' has not been declared
...
What am I doing wrong? I am using Apple Xcode, if that is relevant. Also, perhaps I should mention that I created String.cpp/String.h and was attempting to implement a string class, and the error first appeared when I tried to #include <iostream> in String.cpp; however, the error persisted even when I deleted these files. Thanks.
EDIT: I created a new project and named the class and files MyStr.cpp/MyStr.h and everything seems to work (so far); could the errors have occured because of the file/class name?