M
Marcelo
Hi,
I have to do the following, and would like you suggestions
on how I could achieve it the best way:
I have a text file in the following format:
12345 54321 98765 56789
(3 spaces between numbers)
Those are reference numbers for monetary values. They are
associated with values in this format
1.00 2.00 ... 9.00 10.00 20.00 ... 90.00 100.00 200.00 ...
900.00 1000.00 2000.00 ... 9000.00...
Which is the best way for me to do it? Because I have to
do the following: given the monetary value 123.00:
3.00 x 1 = 3.00
2.00 x 10 = 20.00
1.00 x 100 = 100.00
And supposing:
array[3] = 12345
array[20] = 23456
array[100] = 34567
I would sum those values to obtain a key to validate my
text file in my server.
Everything is implemented, expect for the part in which
the array is populated (i'm working with a "fake" array).
Any help will be very appreciated. And no, this is not
homework. I'm a newbie with C++ and I'm implementing a
component to process messages of payment. That's why I'm
asking help
TIA
Marcelo
I have to do the following, and would like you suggestions
on how I could achieve it the best way:
I have a text file in the following format:
12345 54321 98765 56789
(3 spaces between numbers)
Those are reference numbers for monetary values. They are
associated with values in this format
1.00 2.00 ... 9.00 10.00 20.00 ... 90.00 100.00 200.00 ...
900.00 1000.00 2000.00 ... 9000.00...
Which is the best way for me to do it? Because I have to
do the following: given the monetary value 123.00:
3.00 x 1 = 3.00
2.00 x 10 = 20.00
1.00 x 100 = 100.00
And supposing:
array[3] = 12345
array[20] = 23456
array[100] = 34567
I would sum those values to obtain a key to validate my
text file in my server.
Everything is implemented, expect for the part in which
the array is populated (i'm working with a "fake" array).
Any help will be very appreciated. And no, this is not
homework. I'm a newbie with C++ and I'm implementing a
component to process messages of payment. That's why I'm
asking help
TIA
Marcelo