Retrieve the index of the first element using a predicate
For "easier readability" you could extern the lambda expression form the find_if():

auto pred = [](const char* line) { return strlen(line) &lt;= 10; };
auto it = std::find_if(collection + startAt, 
                       collection + COLLECTION_SIZE,
                       pred);


Also make use of std::begin() and std::end():

auto it = std::find_if(std::begin(collection) + startAt, 
                       std::end(collection),
                       pred);


At least (but probably not last), don't use raw arrays. Rather change collection to a std::array:

std::array&lt;const char*,COLLECTION_SIZE&gt; collection 
    { "time11,time2,time3"
    , "time12,time2,time3"
    , "time13,time2,time3"
    , "time14,time2,time3"
    , "time15,time2,time3"
    , "x\n"
    , "" 
    };
// Note my formatting style above, which makes it easier to extend the array


Here's the fully refactored code:

#include &lt;cstring&gt;
#include &lt;iostream&gt;
#include &lt;algorithm&gt;
#include &lt;array&gt;

const size_t COLLECTION_SIZE = 250; // rather use a const variable than a macro

int main()
{
    std::array&lt;const char*,COLLECTION_SIZE&gt; collection
        { "time11,time2,time3"
        , "time12,time2,time3"
        , "time13,time2,time3"
        , "time14,time2,time3"
        , "time15,time2,time3"
        , "x\n"
        , "" 
    };

    size_t startAt = 2; // care about the correct type. auto would leave you with int

    // replace the loop to search an index by calling to standard library
    auto pred = [](const char* line) { return strlen(line) &lt;= 10; };
    auto it = std::find_if(std::begin(collection) + startAt, 
                           std::end(collection), 
                           pred);
    auto posEmptyItem = std::distance(std::begin(collection), it);
    std::cout &lt;&lt; posEmptyItem &lt;&lt; std::endl;

    return 0;
}


See Live Demo