First Of all I would like to thank Michael Thomas Greer (Duoas ) for his endless help in the forum and to me specially .
I have like this in a file1.txt
OK Green > start 1
OK Green > start 2
No Green > start 3
OK orange > start 1
No orange > start 2
No orange > start 3
OK red > start 1
OK red > start 2
OK red > start 3
File2.txt has this
OK Green > start 1
No Green > start 2
Ok Green > start 3
No orange > start 1
Ok orange > start 2
No orange > start 3
OK red > start 1
OK red > start 2
No red > start 3
OK Green > start 1// note: the content of file1 again start from here
Ok Green > start 2
No Green > start 3
OK orange > start 1
No orange > start 2
No orange > start 3
OK red > start 1
OK red > start 2
OK red > start 3
how to make a function check() using std:map to do this :
for ex-
if (2 statements in file2.txt[18 commands] (Green Green) and (OK OK) return true
if both(Green Green)in file2.txt and (OK NO) return True
if both(Green Green) in file2.txt and (No Ok) return False
if both(Green Green) in file2.txt and (No No) return False
How can we do a compatible check for file1 as well as long it works properly with file2 ?? can be ;)
I think the associative map should have the (color + start_id) as the key, and the number of "OK" instances as the value.