how to convert a string to an integer

I am trying to write a program that converts a roman numeral number to an integer, but I do not know how to convert from a string to an integer. Can someone guide me in the right direction? From there I need to have a function that will get each number into a char array.

the integer values of the roman numerals are
A = 5
B = 1

Like BA = 4, AB = 6, ABA = 9
Last edited on
what do you mean by roman numerals? can you give us a more detailed example?

can you provide a link to a wikipedia page or something for this type of conversion =?
Last edited on
I would suggest taking a look at this example from Stack Overflow. It has a function to get the Roman Numeral in Integer form and a function to convert Roman Numeral 'strings' into Integer format.

http://codereview.stackexchange.com/questions/22876/converting-roman-numerals-to-decimal
Topic archived. No new replies allowed.