@Anurag: The input is said to be of unknown and large length ... read it one
character at a time using a loop like
while((c=getchar())!=EOF){
//body
}
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
@ kunal
I was attempting this problem: http://www.spoj.pl/problems/NHAY/
here,input size of haystick is not limited so,can you tell me how to
read the
haystick.
On Sep 7, 12:06 am, Kunal Patil kp101...@gmail.com wrote:
If I understand question correctly, then just read as many characters as
#includeiostream
#includefstream
using namespace std;
int main()
{
ifstream stream1(D:\\file1.txt);
char a[80];
if(!stream1)
{
cout While opening a file an error is
encountered endl;
}