delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/10/05/17:30:28

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Martin Ambuhl <mambuhl AT earthlink DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: help needed
Date: Tue, 05 Oct 2004 17:29:35 -0400
Lines: 30
Message-ID: <2sgi24F1kprjhU1@uni-berlin.de>
References: <cjutcm$j3m$1 AT ls219 DOT htnet DOT hr>
Mime-Version: 1.0
X-Trace: news.uni-berlin.de qHuyNJkz+rKqPiec+9ib+wmcafxBk8u1I9rfQswXAK6MnBkEUQ
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803
X-Accept-Language: en-us, en, de, fr, ru, zh, ja
In-Reply-To: <cjutcm$j3m$1@ls219.htnet.hr>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

buda wrote:

> Hi
> I installed the latest version from the djgpp site, and all seemed well. The
> C compiler works fine (and has worked fine for me in the past), but I'm
> having trouble with the c++ compiler. Any program that has to read in more
> than one line of input (from cin) crashes. When I run it and type in the
> input, and it seems to get stuck somewhere. I'm talking about simple
> programs like
> #include<iostream>
> using namespace std;
> int main()
> {
>     int x, y;
>     cin >> x >> y;
>     return 0;
> }
> 
> If I were to enter some number and press enter, the program gets stuck and I
> have to kill it. If I enter all the input in a single line, it works fine.
> The install process seemed to pass without any errors. Any ideas?

Since I have no problem with you snippet with input of (compressed for 
presentation) either '1 2\n' or '1\n2\n', or even '1\n^Z\n', I can't 
imagine what your problem is.

If your problem is that you object to being expected to provide two 
input items when your program explicitly says 'give me two input items,' 
the a philosophy newsgroup may be more appropriate.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019