How can i compare each element of an array to all the elements of another array?
Unsolved
General and Desktop
-
int a[] = {pr1,pr2,pr3,pr4,pr5,pr6,pr7,pr8,pr9,pr10}; int b[] = {spr1,spr2,spr3,spr4,spr5,spr6,spr7,spr8,spr9,spr10};
if (first element of a[] <= all elements of b[]){
// mark the element used in b[] and store the value used in int c}
It will do the same from first element of a[] to the last element. How can i achieve this? Thank you
-
We're a Qt forum, not a C beginner forum... please at least post code where you tried to do your task. We're not here to teach you C.
-
@ioanna For such questions better use https://forum.qt.io/category/34/c-gurus as your question does not have anything to do with Qt.
Back to your question: this is actually quite simple to do. What did you try and what does not work?