Using string library in C++
I'm working in Netbeans, programming in C++, and I have a problem: My program worked perfect in visual, but once I copied it to Netbeans, the strlen and strcpy (functions of string library) don't work.
The compiler says:
unable to resolve identifer strlen error: 'strlen' was not declared in this scope.
I have done #include <string>.
Have you done
#include <cstring> or #include <string.h>
Also check if the gcc or cygwin compiler is properly configured with netbeans
also make sure you have put
using namespace std;
using std::strlen; using std::strcpy;
ahead your program