How to split string to sring array withou word splittig in C++ : I need to split input string (array of word, space delimited), into string array with max length 'M' without breakdown any word,
How can do this in C++?
for example:

    input string="I need to split input string";
    where M=10;
    output array ={"I need to ","split ","input ","string"}; 
 