0

How to do search in a 2d array of string

18th Jun 2018, 8:00 AM
Sid Bro
5 Answers
+ 1
use a nested for loop, easiest way to search a 2d array
18th Jun 2018, 11:08 AM
hinanawi
hinanawi - avatar
0
but nested loop can work only for intiger array but i require string array for comparision
18th Jun 2018, 2:51 PM
Sid Bro
0
Sid Bro nested loop can work for any array, as string arrays have indexes too
18th Jun 2018, 2:53 PM
hinanawi
hinanawi - avatar
0
but i want to compare strings not single character
18th Jun 2018, 2:54 PM
Sid Bro
0
string arr[] = {"abc", "def"}; cout << arr[0]; this should output "abc"
18th Jun 2018, 2:57 PM
hinanawi
hinanawi - avatar