I can do this in C, scanf("%s[^.^:^;^\n]", buffer) but I do not know if there is an equivalent input in C++ "cin".
I have checked www.CPlusPlus.com but could not find any in CIn or the <cstring>
could somebody direct me to a site that can explain to me how to do it in C++.
To do what you expect in C, that conversion specifier has to be %[^.^:;\n] (although repeated ^'s are allowed) not %s[^.^:^;^\n] which reads a word up to the first whitespace. (you probably didn't want to read up to the next ^ either, in which case it is simply %[^.:;\n])
C++ doesn't have stream I/O functions that work with scanf-style scansets, but you could set up a ctype where ., ^, :, ;, and \n are whitespace, but no other characters, and use the usual cin >> buffer
My question is if there is an equivalent of scanf("%[^.:;\n]", buffer) in C++ and you answered my question, there is none. Your solution gives me an idea on how to approach the program. Your solution looks OK but I could not quite understand it. so with the idea I got from you I would make my own solution.
If you are wanting to just see if there ARE characters (that characters exist), you can do a for loop with an integer. Then add 1 for every line that is greater than nothing. If the integer is greater than 0, there is data, if the interger = 0, then there is no text.