Home > Back-end >  For help, why in the dev - c compiler will appear in the [wrong] iostream. H: there is no such file
For help, why in the dev - c compiler will appear in the [wrong] iostream. H: there is no such file

Time:09-25

# include
# include
The class String
{public:
String () {
P=NULL;
}
String STR (char *);
Friend Boolean operator & gt; (String & amp; String1, String & amp; String2);
Friend Boolean operator=(String & amp; String1, String & amp; String2);
Friend Boolean operator & lt; (String & amp; String1, String & amp; String2);
Void the display ();
Private:
char *p;
};
String: : String STR (char *)
{
p=str;
}
Void String: : display ()
{
Cout}
Bool operator> (String & amp; String1, String & amp; String2)
{
If (STRCMP (string1. P, string2. P) & gt; 0)
return true;
The else
return false;
}
Bool operator<(String & amp; String1, String & amp; String2)
{
If (STRCMP (string1. P, string2. P) & lt; 0)
return true;
The else
return false;
}
Boolean operator==(String & amp; String1, String & amp; String2)
{
If (STRCMP (string1. P, string2. P)==0)
return true;
The else
return false;
}
Int main ()
{
String string1 (" Hello "), string2 (" Book "), string3 (" Computer ");
Cout<(string1 & gt; String2) & lt; Cout<(string1 & lt; String3) & lt; Cout<(string1==string2) & lt; return 0;
}

CodePudding user response:

Direct # include & lt; iostream>

CodePudding user response:

C + + header files don't add. H
  • Related