Code run on Dev C++ but error in CodeBlock

Hey ,i'm a beginner and just start study C++ in few month. Why my coding wont run in CodeBlock but work in Dev C++. Your help would we very appreciated :)

#include <iostream>
using namespace std;
int kira(int,int);

int main()

int l,w;

cout<<"Enter length :";

cout<<"Enter width :";

cout<<"Area of rectangle is :"<<kira(l,w)<<endl;

system ("pause");
return 0;

int kira(int length , int width)

int area;


return area;

system is not required to be defined by iostream.

I believe cstdlib is the header file you need for system.
Thanks firedraco. Now it worked.
I deleted => system ("pause"); .

Still wondering why it work after I deleted it , hurmmm.

ooh , and cstdlib doesn't work
Topic archived. No new replies allowed.