Christopher Benson-Manica asked:
You may have a problem with <string.h> (should it be the one containing
strcpy() or the std::string class ?)
According to Chuck Alison in the article "What's New in Standard C++"
(
http://www.freshsources.com/newcpp.html), old style library headers are
deprecated ... here is the relevant quote:
Invoking Standard C Headers with a .h suffix
--------------------------------------------
We traditionally think of headers as files, but a compiler is free to make a
header's declarations available in any manner it chooses. To encourage this
point of view, the C++ standards committee voted rather early to drop the ..h
suffix for C++ headers. This means that you should use "#include <
iostream>" instead of "#include <iostream.h>", although most compilers will
allow both. When namespaces were added to the language, the committee
decided to wrap most C++ and all standard C library declarations in the
standard namespace std, and to rename the C headers by prepending a 'c' and
dropping the .h suffix. This means that the preferred method of getting at C
library features is the same for using C++ library elements, for example
#include <cstdio>
int main()
{
std:
rintf("hello, world\n");
}
Thinking that this might be too much of a culture shock, the committee
decided to deprecate instead of to disallow altogether the traditional ".h"
method. For now, if you say "#include <stdio.h>", it's as if you had written
"#include <cstdio>" followed by a using declaration for each identifier
defined in the header (so you don't have to use the std:: prefix).