Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

String addition

$
0
0

Can someone please tell how to add two strings indexwise without using the loop method?

What i mean is: if I have string A; where A is of length 4 and values: '1', '12', '12', '10' ans string b; where b is '1','2','3','4', then by adding, i want '2', '14', '15', '14'. The resultant is also of length 4 but notice the addition, its as per the index. IS there any stl function for the same?


Viewing all articles
Browse latest Browse all 40121

Trending Articles