CLion打印回输入 [英] CLion prints the input back

查看:130
本文介绍了CLion打印回输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有人。我已经使用CLion一段时间了,除了一件事,我确实喜欢它。也许有人遇到了同样的问题。

Everyone. I've been using CLion for some time and I do like it, except one thing. Maybe somebody had the same problem.

问题是当我在控制台中打印某些内容时,IDE会将其打印回来。例如,如果我运行该代码

The thing is that when I print something in console, the IDE prints it back. For example, if I run that code

#include <iostream>
#include <string>

int main() {
    std::string message;
    std::getline(std::cin, message);
    std::cout << "You've printed: " << message;
    return 0;
}

IDE的行为如下:
打印回来

the IDE will act like this: Printing back

我认为问题出在CMake ,但是作为一个新手,我不知道如何解决它。您能帮我吗?

I think that problem lies in CMake, but as a newy I have no idea how to fix it. Could you help me?

推荐答案

我遇到了同样的问题。

似乎这是一个已知问题,与MinGW相关,并且已在JetBrains跟踪器中发生错误:
https://youtrack.jetbrains.com/issue/CPP-2580#u=1443705085694

Seems like it is a known issue, related to MinGW and bugged in JetBrains tracker: https://youtrack.jetbrains.com/issue/CPP-2580#u=1443705085694

IDE只是一个问题/显然,如果在IDE外部运行,程序将正常运行。

It is just an issue with IDE / terminal obviously, program will run properly if run outside of the IDE.

这篇关于CLion打印回输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆