generally speaking if you function only needs to return 1 or 0 a bool works great. There are times when returning a bool is not the best idea. For example if I were writing a function "isprime(int)" I would probably have it return an int rather than a bool. Why? because I may end up multiplying the answer by some value.
So basically any time that I write a boolean function that I might be using in other mathematical expressions I tend to return an integer rather than bool. (not that you can't use the bool in mathematics expressions)
Also, it is very common to care about two conditions: function returned zero, or the function did not return zero -- and if it did not return zero I may want to use that value. So for example my isPrime function might be more useful if it returned the prime number rather than 1 if the number is prime. So I can still use the function as a boolean function, but I can also use it inside other integer expressions.
just something to think about.
QUOTE
The reason I don't use the second suggestion is that we haven't been taught about that yet, so it will look a little fishy if I do. It is nice to learn for future purposes though.
Showing that you have read ahead a little in the book or online is really not generally a problem. It gets a little fishy when you have not mastered the basics but are writing advanced template classes and the boost libraries etc.
Showing that you can pick up on and use the various data types just shows that you are curious and bright.
Heck if my teachers had accused me a of cheating every time I went WAY above and beyond the assignment I would have been screwed (I had been a programmer for a number of years before my first class).