samedi 18 avril 2015

Traversing a 2D array diagonally in both directions in C++

I've had a good look on this site for help traversing in both directions, but have only found help in one diagonal direction.


Anyone have any help how to traverse in both directions?


My aim to to concatenate an empty word string for each full diagonal row. E.g.



A B C
D E F


Would provide me with D, AE, BF, C, A, BD, CE and F.


Thanks in advance!


Aucun commentaire:

Enregistrer un commentaire