小编use*_*775的帖子

我们可以在两个输入之间获得时间吗?

我在看这段代码时想知道:

#include<iostream>
#include<conio.h>

using namespace std;

int main(){

    int a,b;

    cout << "enter 1";
    cin  >> a;

    cout << "enter 2";
     cin >> b;

    getch();
    return 0;
}  
Run Code Online (Sandbox Code Playgroud)

如果我们可以连续得到变量a和b的输入之间的时间差.

c++ time input cin

3
推荐指数
1
解决办法
313
查看次数

我们可以找回在cout中传递的字符串吗?

我有一个代码:

#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
    cout<<"Hello World!";
    getch();
    return 0;
}  
Run Code Online (Sandbox Code Playgroud)

我能收回字符串"Hello World!" 在一些char或字符串变量?

c++ string cout

1
推荐指数
1
解决办法
72
查看次数

标签 统计

c++ ×2

cin ×1

cout ×1

input ×1

string ×1

time ×1