I am using the C++ function strcmp to compare one string to another. However, I am still not getting my program to print in Oldworld linguistics below. Can you please help?
#include <iostream>
#include <fstream>
#include <cctype>
#include <iomanip>
#include <string>
usingnamespace std;
class People{
int popno;
char geograpDNA1[50];
char geograpDNA2[50];
char lingrup1[50];
char lingrup2[50];
public:
void Oldworld_distribution();
void Oldworld_linguistics();
};
void People::Oldworld_distribution(){
cout<<"Enter the population number of Western Europe "<<endl;
cin>>popno;
cout<<"The population of Western Europe is "<<popno<<endl;
}
void People::Oldworld_linguistics(){
cout<<"Enter the linguistics of the area "<<endl;
cin.ignore();
cin.getline(lingrup1,50);
cin.getline(lingrup2,50);
char strcmp(constchar *lingrup1, constchar* lingrup2 );
if (lingrup1 == lingrup2){
printf("Iberian");
}
}
int main()
{
People groups;
groups.Oldworld_distribution();
groups.Oldworld_linguistics();
return 0;
}