this is me code, i need strlen to recognise the sapces, how do you do this.
Code:#include <iostream> #include <fstream> using namespace std; int main () { char * buffer; char tbuffer[100]; int len; int leng; ofstream a; a.open("test.txt",ios::binary); cout<<"please type a sentence > "; cin>> tbuffer; len=strlen(tbuffer); a.write(tbuffer,len); tbuffer[len]=0; cout<< strlen(tbuffer); cin.get(); a.close(); }