+ 1
What's wrong in that part of code?
What's wrong in that part of code? If (howare == 1); { cout << "\n 1"; } Error: ..\Playground\: In function 'int main()': ..\Playground\:10:24: error: 'If' was not declared in this scope If (howare == 1); { ^
6 ответов
+ 9
Delete ; after if
+ 4
Also, the 'I' in 'If' is upper-case, it should be lower.
+ 2
if must be lower case, main return an int, so mybee you add return 0;
0
Now I got that:
..\Playground\: In function 'int main()':
..\Playground\:10:24: error: 'If' was not declared in this scope
If (howare == 1) {
^
..\Playground\:10:26: error: expected ';' before '{' token
If (howare == 1) {
^
Bigger part of code:
int main() {
int howare;
cout << "Hello!";
cin >> howare;
cout << "\n 1 \n 2 \n 3";
If (howare == 1) {
cout << "\n 1";
}
0
post the whole code please
0
Liam, thanks! ;D