Driver method to check above comparison function
int main ( ) { string version1 = "1.0.3" ; string version2 = "1.0.7" ; if ( versionCompare ( version1 , version2 ) < 0 ) cout << version1 << " ▁ is ▁ smaller STRNEWLINE " ; else if ( versionCompare ( version1 , version2 ) > 0 ) cout << version2 << " ▁ is ▁ smaller STRNEWLINE " ; else cout << " Both ▁ version ▁ are ▁ equal STRNEWLINE " ; return 0 ; }