1set_input_string(3) gstream manual set_input_string(3)
2
3
4
6 set_input_string
7
9 #include <gstream.h>
10
11
12 void set_input_string(char const *s);
13
15 This function provides a way to specify an editable default string when
16 inputting. Consider the following example:
17
18 char buf[100];
19 gs << "What's your opinion about gstream?\n";
20
21 gs.set_input_string("I think it is incredible wonderful!");
22 gs.getline(buf, 100);
23
24 The user will see the following
25
26 What's your opinion about gstream?
27 I think it is incredible wonderful!|
28
29 where the '|' represents the cursor, and (s)he can edit the string, for
30 example
31
32 What's your opinion about gstream?
33 I think it is superior, fantastic and| wonderful!
34
35 resulting in 'buf' containing the string "I think it is superior, fan‐
36 tastic and wonderful!"
37
38
39
40
41gstream version 1.6 set_input_string(3)