View Single Post
Old 04-29-2005, 04:56 PM   #9 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,545
Valmont is on a distinguished road
Strictly, you don't need math do learn a language. Not a programming language, nor French or Chinese. However, as you move on you'll learn the ways of datastructures and algorithms. To understand the performance (=complexity) of these two subjects, you'll need the math. At one point you have to find the right way to store your data and match this way (datastructure) with the proper algorithms for maximum performance, correctness and or ease. Besides, the math major may be used to sharpen the "thinking" of the student in general.

As it comes to itoa(), you have just encountered your very first experiance on why it is bad to use non-standard implementations. You see, my compiler doesn't know what an itoa() is! Although I do have the <cstdlib> library. So your code didn't compile on my machine.
Luckily, there was only one instance of this, so I could fix it in a minute or so. But imagine one programs 80,000 lines of code, and then the project is going to be standardized... expensive isn't it

Since you need to add comments, I'll give you this comment for your teacher:
// http://www.research.att.com/~bs/bs_faq2.html
Add this comment above the itos() implementation.

Good luck and make sure we hear from you .
- Val -
__________________
Valmont is offline   Reply With Quote