Guess what i have an error. plz help me

+1 pavit pal · October 22, 2016
/images/forum/upload/2016-10-16/226d228a7f0dc4cdc27928e801d19ffb.jpg

Post a Reply

Replies

Oldest  Newest  Rating
+1 Scott Walker · October 22, 2016
The If statement is inside the function whilst the else is outside.
Try to use curly braces on if statements, they make it easier to read and safer (Read Apple's Goto error as to why it's safer)

Code should be:

void pavitIsAwesome(){
if(whatever you expression){

}
else{

}
}

Look at camelCasing as well. Makes your code easier to read :-)
0 Arch38 ツ · October 22, 2016
youve missed a curly bracket in the if statement.
0 Aditya Viswanatham · April 23, 2017
Write down else in a different line and try compiling it.
0 Aditya Viswanatham · April 23, 2017
You missed a curly brace after if.
  • 1

C++

131,253 followers
About

Used in many types of software including music players, video games, and many large scale applications.

Links
Moderators
Bucky Roberts Administrator