Add an overloaded function
This commit is contained in:
parent
ca230a7cf3
commit
8acea57ad2
2 changed files with 13 additions and 1 deletions
|
@ -52,10 +52,19 @@ string ConvertNumToSpokenDigits(string n) {
|
|||
str += " ";
|
||||
}
|
||||
}
|
||||
|
||||
return(str);
|
||||
}
|
||||
|
||||
|
||||
// Convert an integer to spoken digits
|
||||
string ConvertNumToSpokenDigits(int n) {
|
||||
char buf[12]; // should be big enough!!
|
||||
sprintf(buf, "%i", n);
|
||||
string tempstr1 = buf;
|
||||
return(ConvertNumToSpokenDigits(tempstr1));
|
||||
}
|
||||
|
||||
|
||||
// Convert a 2 digit rwy number to a spoken-style string
|
||||
string ConvertRwyNumToSpokenString(int n) {
|
||||
string nums[10] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"};
|
||||
|
|
|
@ -40,6 +40,9 @@ SG_USING_STD(string);
|
|||
// Convert any number to spoken digits
|
||||
string ConvertNumToSpokenDigits(string n);
|
||||
|
||||
// Convert an integer to spoken digits
|
||||
string ConvertNumToSpokenDigits(int n);
|
||||
|
||||
// Convert a 2 digit rwy number to a spoken-style string
|
||||
string ConvertRwyNumToSpokenString(int n);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue