libsaria: New print functions

I added a print(int) function to print out integer values.  I also
created println() functions for strings and ints.
This commit is contained in:
Bryan Schumaker 2011-09-17 13:48:09 -04:00
parent 1abdd945ae
commit ef5da936b4
2 changed files with 24 additions and 3 deletions

View File

@ -5,5 +5,9 @@
using namespace std;
void print(string item);
void print(int item);
void println(string item);
void println(int item);
#endif /* LIBSARIA_PRINT */

View File

@ -6,11 +6,28 @@ using namespace std;
#ifdef DEBUG
void print(string item)
{
cout << item;
}
void println(string item)
{
cout << item << endl;
}
void print(int item)
{
cout << item;
}
void println(int item)
{
cout << item << endl;
}
#else /* DEBUG */
void print(string item)
{
}
void print(string item) {}
void print(int item) {}
void println(string item) {}
void println(int item){}
#endif /* DEBUG */