aks
aks

Reputation: 1359

deleting bytes from an ostringstream

how do i delete the first n bytes of an ostringstream?

I basically have to see howmany bytes went over a socket and if it did not go through fully...i have to delete whatever went through

Upvotes: 1

Views: 190

Answers (1)

BatchyX
BatchyX

Reputation: 5114

Just do what you said : remove the first n bytes ?

ostr.str(ostr.str().substr(n))

Upvotes: 1

Related Questions