| |

VerySource

 Forgot password?
 Register
Search
View: 733|Reply: 6

Help ~ !!!!

[Copy link]

2

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-3-6 11:00:01
| Show all posts |Read mode
#include <iostream>
#include <string>
using namespace std;

int main ()
{
 string word;

 while (cin >> word)
       cout << "word read is:" << word << '\n';

 cout << "ok: no more words to read: bye!\n";
 return 0;
}

     When can I run this program to output ok: no more words to read: bye!
Huh? ? ? ? This question seems a bit perverted, hehehe, help me back
Reply

Use magic Report

0

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-5-23 08:30:01
| Show all posts
If this is also BT, C ++ cannot be regarded as a BT language
Reply

Use magic Report

2

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-6-27 11:45:01
| Show all posts
Brother, please tell me about it
Reply

Use magic Report

0

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-6-27 15:45:01
| Show all posts
ctrl+z and press Enter twice
Reply

Use magic Report

0

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-6-27 17:45:02
| Show all posts
Enter ctrl+z under windows
Enter ctrl+d under unix
Reply

Use magic Report

0

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-6-27 18:15:01
| Show all posts
Ctrl+z  is the input termination sign, so it will end the input, and output ok: no more words to read: bye!
Reply

Use magic Report

2

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-7-10 19:45:01
| Show all posts
3Q!!!
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list