Can't see anything wrong with simple code

Posted by melee on Stack Overflow See other posts from Stack Overflow or by melee
Published on 2010-04-15T15:19:08Z Indexed on 2010/04/15 15:23 UTC
Read the original article Hit count: 171

Filed under:
|
|

Here is my implementation file:

using namespace std;

#include <iostream>
#include <iomanip>
#include <string>
#include <stack>  //line 5
#include "proj05.canvas.h"

//----------------Constructor----------------//

Canvas::Canvas() //line 10
{
  Title = "";
  Nrow = 0;
  Ncol = 0;
  image[][];  // line 15
  PixelCoordinates.r = 0;
  PixelCoordinates.c = 0;
}

//-------------------Paint------------------// line 20
void Canvas::Paint(int R, int C, char Color) 
{
  cout << "Paint to be implemented" << endl;
}

The errors I'm getting are these:

proj05.canvas.cpp: In function 'std::istream& operator>>(std::istream&, 
    Canvas&)':
proj05.canvas.cpp:11: error: expected `;' before '{' token
proj05.canvas.cpp:22: error: a function-definition is not 
    allowed here before '{' token
proj05.canvas.cpp:24: error: expected `}' at end of input
proj05.canvas.cpp:24: error: expected `}' at end of input

These seem like simple syntax errors, but I am not sure what's wrong. Could someone decode these for me? I'd really appreciate it, thanks for your time!

© Stack Overflow or respective owner

Related posts about c++

Related posts about syntax