Problems with g++-4.3; strchr was not declared in this scope
The following is the part of the code, along with the include statements where the problem occurs.
The following is a snip from the code: convertIt.cxx
...
#define __NO_USE_
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>
#include <cstdio>
using namespace std;
...
istream& operator>>(istream& i, real& r)
{
static char buf[132];
i >> buf;
char* D = (strchr(buf,'D')); if(D) *D='E';
char* d = (strchr(buf,'d')); if(d) *d='E';
sscanf(
return i;
}
...
root@ubuntu:
convertIt.cxx: In function ‘std::istream& operator>
convertIt.cxx:160: error: ‘strchr’ was not declared in this scope
...
...
Also:: ' error: 'strcmp' was not declared in this scope (later in the code).
root@ubuntu:
lrwxrwxrwx 1 root root 7 2009-03-06 13:03 /usr/bin/g++ -> g++-4.3
NOTE: In an older version of Ubuntu, with g++-4.1 the module compiled without errors.
Any ideas.
Thanks,
Jim
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Antonio Litterio
- Solved:
- Last query:
- Last reply: