www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript
electronics



c++ - cout use

↑ ↓ ← iyer <sury1947 hotmail.com> writes:
Dear Group, I got the version 8.43 IDDE working. But when tried to compile
cout, cin commands, it is not working. can somebody enlighten me. thanks
Jun 21 2007
↑ ↓ Bertel Brander <bertel post4.tele.dk> writes:
iyer skrev:
 Dear Group, I got the version 8.43 IDDE working. But when tried to compile
 cout, cin commands, it is not working. can somebody enlighten me. thanks

Did you install the stl? See: http://www.digitalmars.com/faq.html#iostream How does the program you are trying to compile look? -- Just another homepage: http://damb.dk But it's mine - Bertel
Jun 22 2007
↑ ↓ iyer <sury1947 hotmail.com> writes:
Respected Bertel sir,
thank you very much for your prompt reply.
I followed faq for stl.
the program is enclosed.
after some integers are typed and  entered, the screen goes off.
Jun 22 2007
→ Walter Bright <newshound1 digitalmars.com> writes:
iyer wrote:
 Respected Bertel sir,
 thank you very much for your prompt reply.
 I followed faq for stl.
 the program is enclosed.
 after some integers are typed and  entered, the screen goes off.

Open a console window and then run the program within it.
Jun 23 2007
Bertel Brander <bertel post4.tele.dk> writes:
iyer skrev:
 Respected Bertel sir,
 thank you very much for your prompt reply.
 I followed faq for stl.
 the program is enclosed.
 after some integers are typed and  entered, the screen goes off.

You could add this at the end of the program: cin.get(); Or use: #include <stdlib.h> ... system("pause"); -- Just another homepage: http://damb.dk But it's mine - Bertel
Jun 23 2007
↑ ↓ iyer <sury1947 hotmail.com> writes:
respected sirs,
thank you very much for your guidance.
now onely one charcater of input is in output.
also it gives 4627144 without giving any input.
help please.
iyer.
Jun 23 2007
↑ ↓ Bertel Brander <bertel post4.tele.dk> writes:
iyer skrev:
 respected sirs,
 thank you very much for your guidance.
 now onely one charcater of input is in output.
 also it gives 4627144 without giving any input.
 help please.

I assume that you define _CONSOLE Your variable a is of type char, so "cin >> a;" will only read one character, whether it is a number or not. If it sould be a number it must be a short, int, long or double, or variants thereof. If you type 123<enter> at the prompt, the first character ('1') will be stored in a, the rest (23) will be stored in c, without asking you to hit enter. -- Just another homepage: http://damb.dk But it's mine - Bertel
Jun 24 2007
↑ ↓ → iyer <sury1947 hotmail.co> writes:
Respected Bertel sir,
thank you, I understood now.
will learn more and come back.
Have a nice time.
god bless you.
iyer
Jun 25 2007