c++ - 为 C++ 设置的 VS 代码
问题描述
我是 VS 代码的新手。我编写了如下所示的 C++ 代码。但不幸的是,在终端或输出面板中,我无法同时获得字符串和变量值。在终端中仅显示变量的输入值。如何解决这个问题?
#include <bits/stdc++.h>
int main()
{
int slices;
std::cin >> slices;
std::cout << "You got " << slices << " of pizzas" << std::endl;
return 0;
}
解决方案
推荐阅读
- javascript - 使用三元运算符的 JavaScript 递归函数
- python - 如何用熊猫中的其他值重命名多索引索引值?
- php - 为什么我不能从类中的调用方法返回字符串?
- python - 如何通过 tcl 访问 Menu Tkinter?
- python - 熊猫排序但保持在组中
- flutter - 如何进入小部件内部,使其自身的大小被 FittedBox 缩小
- jupyter-notebook - jupyter笔记本中的交叉引用
- javascript - 录音机脚本适用于除 Edge 浏览器以外的大多数浏览器
- r - 将 R 对象上传到 Azure Blob 容器
- angular - ionic3 在搜索地址时设置离子输入超时