In a code I have 2 CString which contain a part of version number,
First exe contain version 1.1234.3.1 and the second exe has version 1.2.3.1.
Code should be such that
Suppose
CString MinVreg,MinFref;
if(MinVreg<MinFref) //when MinVreg="1234" and MinFref="2"
{
//it enters in if loop.
//Update registry
}
elseif(MinVreg>MinFref)
{
//Show message box..
}
I think the operator check only first digit.So please tell me how to compare it as a number
You have to parse the strings to represent a version as an integer array, then perform a lexicographic compare.
Usage: