expected un-qualified id at end of input error

these are the error in the below code,,please help me out!!

24 C:\OpenCV2.0\samples\c\program.cpp expected `}' at end of input
24 C:\OpenCV2.0\samples\c\program.cpp expected unqualified-id at end of input
24 C:\OpenCV2.0\samples\c\program.cpp expected `,' or `;' at end of input

#include<iostream>
#include <fstream>
#include<maze.h>

//using namespace std;


int main()
{
//sfstream nin;
//nin.open("nikhil.txt");
maze a;
for(int i=0;i<18;i++)
{
for(int j=0;j<21;j++)
{
cout<<line[i][j];
}

cout<<endl;
}

return 0;
}
It's hard to say because we don't know what's inside maze.h.
Post your code in code tags - the <> button on the right under format. It makes it easier to read.

A few problems here

maze a;

C/C++ are strongly typed languages - you have to specify variables with a type. maze is not a type.

cout<<line[i][j];

you haven't declared or inialised this variable.

you have an extra brace.

read the documentation on the reference pages on this site to find out about all the different things you need, variables, arrays, types etc.
Topic archived. No new replies allowed.