help to compare data from file using shell script to c++ program

hello ....i am new in shell script..I have one shell script which read inputs from file...and second is c++ pgm..i call my script from c++ programm..to compare file values to c++ pgm value..
our shell script is shubhi.sh

#! /bin/sh
while read line
do
echo -e"$line"
done<file1

this script reads line by line from file.file store data like this

shubhi;gupta

my c++ program is

#include <iostream>
#include<string>
using name space std;
int main()
{
 
string username="shubhi";
string password="gupta";
cout<<username;
cout<<password;
 
system(./shubhi.sh);
return 0;
}

please help me how to compare file input using script with c++ program..

Well, there are many:
cmp is a byte by byte compare.
diff has many options for line comparison and difference detection.
If your sort unique the data, the comm command allows you to see the common lines, first file only lines, second file only lines, or any combination.
Comparing cksum or MD5 values is useful in some situations, like if the files are not co-located.