1
0
Fork 0

Add an overloaded function

This commit is contained in:
daveluff 2003-09-19 16:48:27 +00:00
parent ca230a7cf3
commit 8acea57ad2
2 changed files with 13 additions and 1 deletions

View file

@ -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"};

View file

@ -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);