Hi guys.I just did a program that converts arabic to romanic numbers in Borland c++ and it works fine.Although it may sound a noob question im asking for some help because my code doesnt work in dev c++.All my errors are somethin like this :invalid types `char*[float]' for array subscript
Second, your code uses type float to represent integer quantities, and in particular attempts to use a float as an array subscript (or index).
In function f() replace these lines:
Ok thanks it works now but now i have another problem.I need to use only 1 function and i have 2 functions..I tried to merge them but unsuccessful.Here is my code
I'm not considering how to make the program work.
But if you really wanted to reduce this to just using one function, you could bring the contents of function f() inside main()
One thing which makes the code very hard to read and understand is the use of single letters as variable names and function names.
There are cases where brevity is useful, for example loop counters or array subscripts may be better kept short, other names, particularly function names are much easier to comprehend if they were meaningful. For example function k() - the body of this function is easy to understand, but the letter k itself reveals nothing about its purpose.
The way I look at it is that the audience of the program code is the human reader. If we were only interested in writing something which the computer could understand, we wouldn't bother with anything other than machine code, most likely in binary.