TRint bug on Windows


I have posted the following problem before, but I didn’t get any reply.
I hope that anyone of the root team can tell me if the problem is very hard to solve or if you just don’t have time, or whatever.

I really need the problem to be solved in my application.
I know that not a lot of people will encounter this problem so it has maybe not high prioraty for you.

If you don’t have the time to solve it, let me know so I can try to solve it by myself.

So the problem is, when I run the following code,

TRint *app = new TRint(“App”, &argn, &argp,NULL,0,true);
while(true) {
cin >> xx;

the input is still interpreted (in a strange way) in the cin statements.
(Type for example a couple of times the return key.)

This problem only occures on windows.

Thanks for reply.


Could you send the concrete code . In your example xx is not defined.


It doesn’t matter what xx is. It can be for example a character array.

You can also try this:

#include <TRint.h>
int main(int argc, char *argv[])
TRint *app = new TRint(“App”, &argc, argv,NULL,0,true);
while(true) {}
return 0;

run it and type .q, which actually should end the interpreter.
But if you make some more input, it is still interpreted.

Thanks for help,


Hi Matthias,
thanks for reporting it.
The reason is when Rint teminates it is
dropped into another loop.

I would like add this is not Windows specific.
The same effect in under linux also.

Regards. Valeriy