While I was making a programme in C++ for Calculating area of the square a compiling error was found as - statement missing.
'Statement missing' error in C++
Collapse
X
-
Tags: None
-
Check all your braces are matched.
Check for missing semi-colon.
If you use a struct check it ends with a semi-colon.
BTW: It helps if you post your code. -
-
its the program to calucalte area of square
Code:#include<stdio.h> #include<conio.h> void main() { int side,area; printf("Enter side of Square"); scanf("%d",&side"); area=side*side; printf(" \n Area of Square is : %d sq units",area); getch(); }
Comment
-
@swapnali143
The OP said she/he was writing code in C++ so its not particularly helpful to provide complete C code for the task.
(in fact this forum frowns on the practice of providing complete coding solutions because of adverse learning benefit to the OP)
Also a statement by definition ends with a semicolon (;) so as weaknessforcats suggests its absence is one likely cause.Comment
Comment