Hi all
I am trying to remove consecutive blank space by single blank space but getting error by this small line-ch='';
This is what I have done till now-
#include <iostream.h>
#include <ctype.h>
#include <conio.h>
void main()
{
char ch;
int count=0;
ifstream in_stream;
ofstream out_stream;
clrscr();
in_stream.open("A.txt");
out_stream.open("B.txt");
while (!in_stream.eof())
{
if(isspace(ch))
count++;
if(count >= 2)
{
ch='';
count = 0;
}
else
{
out_stream <<ch;
}
out_stream << ch;
}
}
`Error is - Character constant must be one or two charcters long`
I am learning C++ in Turbo C++ as per our syllabus requirement.
Thank you in advance