12345678910111213 |
- /* Create a function that returns true if an asterisk * is inside a box.
- */
- #include <algorithm>
- bool inBox(std::vector<std::string> arr) {
- bool asteriskFound = false;
- for(int i=0;i<arr.size();i++){
- // search array for "*", if "*" is found return true
- if(std::find (arr[i].begin(),arr[i].end(),'*')!=arr[i].end()){
- asteriskFound=true;
- }
- }
- return asteriskFound;
- }
|