Newbie problem with the String class
Martin Wiebusch
marwie at gmx.net
Wed Feb 9 12:51:55 GMT 2000
Eric Rouse wrote:
> Try this instead then work on String - note standard library headers
> don't have the .h and also make sure your using the new gcc compiler
> (2.95.2 - www.gcc.org) if you want to use exceptions...
>
>
> #include <iostream>
> using namespace std;
>
> int main ()
> {
> cout << "Hello, World." << endl;
> return 0;
> }
>
>
> Regards,
> Eric
Ok, this works, but anyway, I can't create any instances of the String
class. I tried this:
#include <iostream>
#include <String>
int main ()
{
String s = "Hello world";
return 0;
}
Building the project again produced said error messages:
> undefined reference to 'String::String(char const *)'
> undefined reference to 'String::~String(void)'
> undefined reference to 'String::~String(void)'
Any idea?
More information about the KDevelop
mailing list