Function C++ | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Function C++

RUS Š—Š“рŠ°Š²ŃŃ‚Š²ŃƒŠ¹Ń‚Šµ, у Š¼ŠµŠ½Ń Š²Š¾Š·Š½ŠøŠŗŠ»Š° ŠæрŠ¾Š±Š»ŠµŠ¼Š°. ŠÆ хŠ¾Ń‡Ńƒ сŠ“ŠµŠ»Š°Ń‚ŃŒ тŠ°Šŗ, чтŠ¾Š±Ń‹ фуŠ½ŠŗцŠøя Š²Š¾Š·Š²Ń€Š°Ń‰Š°Š»Š° Š±ŃƒŠ»ŠµŠ²Š¾Šµ Š·Š½Š°Ń‡ŠµŠ½ŠøŠµ Šø Š¾Š½Š¾ Š·Š°ŠæŠøсыŠ²Š°Š»Š¾ŃŃŒ Š² ŠæŠµŃ€ŠµŠ¼ŠµŠ½Š½ŃƒŃŽ "bol", Š½Š¾ Š²Š¼ŠµŃŃ‚Š¾ этŠ¾Š³Š¾ ŠŗŠ¾Š¼ŠæŠøŠ»ŃŃ‚Š¾Ń€ Š²Ń‹Š“Š°Ń‘Ń‚ Š¾ŃˆŠøŠ±Šŗу. Š˜Š· Š·Š° чŠµŠ³Š¾ Š²Š¾Š·Š½ŠøŠŗŠ°ŠµŃ‚ этŠ° Š¾ŃˆŠøŠ±ŠŗŠ°? ENG Hi. I had a problem. I want the function to return a Boolean value and write it to the variable "bol", but instead the compiler generates an error. What causes this error? https://code.sololearn.com/c6CaBh65F4rl/?ref=app

17th Apr 2018, 5:09 AM
Black & White
Black & White - avatar
7 Respostas
+ 2
Your piping to cout is the wrong way: cout << key Please! Indent correctly, to make your code readable
17th Apr 2018, 6:50 AM
Loeschzwerg
+ 1
Change line 12 to the following and it will work: cout << bol;
17th Apr 2018, 8:59 AM
Ipang
0
You have to include #include <string> to be able to compare strings.
17th Apr 2018, 5:16 AM
XiLef
0
#include <string> is part #include <iostream> , why include it then? sorry for my bad English
17th Apr 2018, 5:20 AM
Black & White
Black & White - avatar
0
There some more features in this header.
17th Apr 2018, 5:21 AM
XiLef
0
Okay, I understand the problem. Cout does not output the values of variables of type boolean.
17th Apr 2018, 5:27 AM
Black & White
Black & White - avatar
- 1
cout >> bol is wrong, you have to use << with cout
17th Apr 2018, 9:30 PM
$Ā¢šŽā‚¹š”­!šØš“
$Ā¢šŽā‚¹š”­!šØš“ - avatar