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

c++ - cryptic command-line output

↑ ↓ ← Jens Friese <j.friese highfisch.de> writes:
Hi,

command line output seems to be a tricky thing.
I try to write a few simple words to the command line,
and the result is SOMETIMES barely recognizable.

The following code:

	disp_printf("reading from txt file...");
	...
	disp_printf("done\n");
	disp_printf("dynamic memory allocation ...");
	...
	disp_printf("done\n");

result in this output:

"reading from txt file...26495033058122503ry allocation 
...033058122503ry allocation ....26395033058122503ry allocation"

COUT and CERR lead to similar (more or less crypic) results.
What could be the reason for this behaviour?

Regards, Jens
Sep 01 2002
↑ ↓ → "Walter" <walter digitalmars.com> writes:
Could be a pointer bug scrambling the text strings.

"Jens Friese" <j.friese highfisch.de> wrote in message
news:3D723885.20606 highfisch.de...
 Hi,

 command line output seems to be a tricky thing.
 I try to write a few simple words to the command line,
 and the result is SOMETIMES barely recognizable.

 The following code:

 disp_printf("reading from txt file...");
 ...
 disp_printf("done\n");
 disp_printf("dynamic memory allocation ...");
 ...
 disp_printf("done\n");

 result in this output:

 "reading from txt file...26495033058122503ry allocation
 ...033058122503ry allocation ....26395033058122503ry allocation"

 COUT and CERR lead to similar (more or less crypic) results.
 What could be the reason for this behaviour?

 Regards, Jens

Sep 01 2002