0
how to compare a strings without using string compare predefine function?
3 odpowiedzi
+ 16
Dear aditya kumar pandey,
it was just a missprint. Don't be so picky.
+ 12
you can just compare them without using anything. The program will compare them by alphabetical order
include <iostream>
#include <string>
using namespace std;
int main() {
string word= "lara";
string some= "alar";
if(word<some)
cout<<word;
else
cout<<some;
return 0;
}
+ 1
Do not fight please.....