0

Hello, I'm working on a project where certain characters can have multiple values.. E.g.

Letter 'A' can be replaced with 'B', 'C', 'D'
Letter 'S' can be replaced with 'X', 'Y'

And then it would output it like this:

A can be replaced with B - Yes/No
A can be replaced with C - Yes/No

Would you use a 2D array?

Thanks :)

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by NathanOliver
0

What tools do you have at your disposal? If you can not use the STL then you will probably want to use a 2d char array. If you can use the STL then a multimap might do what you need.

0

Hey thanks for your reply..

So would would go like this:

int arr[26][10]; // "A" can have 10 different options

Would this work? Or could I use like a Linked-List?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.