Is it possible in C++ to show a message before input a value in a variable? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Is it possible in C++ to show a message before input a value in a variable?

3rd May 2017, 12:23 PM
Γιάννης Δημητριάδης
Γιάννης Δημητριάδης - avatar
16 Answers
+ 15
it is working. ..but not the same way other Compiler do. ..for security reasons
3rd May 2017, 12:34 PM
Mohamed Asem
Mohamed Asem - avatar
+ 15
solo learn playground take your code and inputs and send both of them in private server to be compiled over cloud ...then the server response and send you the output ! in one single operation that is why you should add your inputs before running the code
3rd May 2017, 12:44 PM
Mohamed Asem
Mohamed Asem - avatar
+ 14
you can type cout << "Enter the year "; cin >> year; in codeblocks or any c++ IDE
3rd May 2017, 12:31 PM
Mohamed Asem
Mohamed Asem - avatar
+ 14
they shouldn't create an open channel for any user with their servers or they will be hacked !
3rd May 2017, 12:39 PM
Mohamed Asem
Mohamed Asem - avatar
+ 14
you are right 👌
3rd May 2017, 12:49 PM
Mohamed Asem
Mohamed Asem - avatar
+ 13
@Fuyuka +1
3rd May 2017, 12:29 PM
Mohamed Asem
Mohamed Asem - avatar
+ 13
yes
3rd May 2017, 12:47 PM
Mohamed Asem
Mohamed Asem - avatar
+ 12
can you give an example?
3rd May 2017, 12:25 PM
Mohamed Asem
Mohamed Asem - avatar
+ 11
Not possible in code playground(SoloLearn) U can do that in real compiler(not online one)
3rd May 2017, 12:27 PM
Fuyuka Ayumi(冬花)
+ 2
This is power of coding.. haha...
3rd May 2017, 12:44 PM
Γιάννης Δημητριάδης
Γιάννης Δημητριάδης - avatar
+ 2
So actually is not a real-time compiling.
3rd May 2017, 12:46 PM
Γιάννης Δημητριάδης
Γιάννης Δημητριάδης - avatar
+ 2
And I guess with this way can keep the app light.
3rd May 2017, 12:48 PM
Γιάννης Δημητριάδης
Γιάννης Δημητριάδης - avatar
+ 1
Like you have to input a year and you want to show a message "Enter a year" but you want to show it before input the year.
3rd May 2017, 12:26 PM
Γιάννης Δημητριάδης
Γιάννης Δημητριάδης - avatar
+ 1
Security reasons?
3rd May 2017, 12:35 PM
Γιάννης Δημητριάδης
Γιάννης Δημητριάδης - avatar
0
Hmmm.. This is what I thought. How is this possible in general?
3rd May 2017, 12:28 PM
Γιάννης Δημητριάδης
Γιάννης Δημητριάδης - avatar
0
So cout actually is not working right in sololearn, right?
3rd May 2017, 12:33 PM
Γιάννης Δημητριάδης
Γιάννης Δημητριάδης - avatar