Simple fix
This commit is contained in:
parent
5a3af51826
commit
92820555da
@ -21,11 +21,10 @@ namespace platform {
|
|||||||
string getColumnName(int colNum)
|
string getColumnName(int colNum)
|
||||||
{
|
{
|
||||||
string columnName = "";
|
string columnName = "";
|
||||||
int modulo;
|
|
||||||
if (colNum == 0)
|
if (colNum == 0)
|
||||||
return "A";
|
return "A";
|
||||||
while (colNum > 0) {
|
while (colNum > 0) {
|
||||||
modulo = colNum % 26;
|
int modulo = colNum % 26;
|
||||||
columnName = char(65 + modulo) + columnName;
|
columnName = char(65 + modulo) + columnName;
|
||||||
colNum = (int)((colNum - modulo) / 26);
|
colNum = (int)((colNum - modulo) / 26);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user