1

My program reads standart input to EOF and puts it into string like this

ostringstream ss;
ss << cin.rdbuf();
m_Input = ss.str();

It works fine, but when I try to debug this program in CLion, I type some string into the console and then press CTRL + D. But doing this makes the debugging end with SIGHUP on line 2 of this fragment. Is there a way how to avoid this and let the debugging continue? Or is there other way how to give the debugger input with EOF?

second32
  • 83
  • 1
  • 9
  • 1
    please refer https://stackoverflow.com/questions/36405577/sending-eof-to-stdin-in-clion-ide – Tejendra Jul 21 '20 at 17:48
  • i'm not a CLion user, but i assume that the underlying debugger is actually gdb (or maybe lldb). The underlying debugger may have finer-grained configuration options that it can process beyond what the CLion GUI exposes. So if you don't find CLion specific answers, try searching about the actual debugger. – pestophagous Jul 21 '20 at 17:51

0 Answers0