problem when to try to convert console example in u8g library to object

HI,
I was trying to convert console example in u8g to an object called oled, so I could use this library later as a debug tool.
However, when I try to do this, it comes up an error "expected '}' at end of input", and I still couldn't solve it. Could you help me solve it?

Here is the model I had done: I delete read_line() function and all the code related to Serial port. I added a new function called println(), so instead of reading from the Serial port, I could use println() to let oled print whatever string I want.

Here is my source code:
class oled
{
public:
//method
oled(int CLK, int DIN, int CS, int DC, int RES);
void setup(void);
void clear_screen(void);
void println(String str);

private:
//method;
void add_line_to_screen(void);
void draw(void);
void exec_line(void);
void reset_line(void);
void char_to_line(uint8_t c);
};

oled::oled(int CLK, int DIN, int CS, int DC, int RES) {
#include "U8glib.h"
U8GLIB_SSD1306_128X64 u8g(CLK, DIN, CS, DC, RES);

}

// clear entire screen, called during setup
void oled::clear_screen(void) {
uint8_t i, j;
for ( i = 0; i < ROW_MAX; i++ )
for ( j = 0; j < LINE_MAX; j++ )
screen*[j] = 0;*
}
// append a line to the screen, scroll up
void oled::add_line_to_screen(void) {

  • uint8_t i, j;*
  • for ( j = 0; j < LINE_MAX; j++ )*
  • for ( i = 0; i < rows - 1; i++ )*
    _ screen*[j] = screen[i + 1][j];_
    for ( j = 0; j < LINE_MAX; j++ )
    screen[rows - 1][j] = line_buf[j];
    _
    }_
    _
    // U8GLIB draw procedure: output the screen*_
    void oled::draw(void) {
    * uint8_t i, y;
    _
    // graphic commands to redraw the complete screen are placed here*_
    * y = 0; // reference is the top left -1 position of the string*
    * y--; // correct the -1 position of the drawStr*
    * for ( i = 0; i < rows; i++ )*
    * {*
    _ u8g.drawStr( 0, y, (char )(screen));
    y += u8g.getFontLineSpacing();
    }
    }
    void oled::exec_line(void) {
    // add the line to the screen*
    * add_line_to_screen();*
    * // U8GLIB picture loop*
    * u8g.firstPage();
    do {
    draw();
    } while ( u8g.nextPage() );
    }
    // clear current input buffer*
    void oled::reset_line(void) {
    * line_pos = 0;
    line_buf[line_pos] = '\0';*

    }
    // add a single character to the input buffer
    void oled::char_to_line(uint8_t c) {
    * line_buf[line_pos] = c;
    line_pos++;
    line_buf[line_pos] = '\0';*

    }
    void oled::println(String str) {
    * int str_len = str.length() + 1;
    char char_array[str_len];
    str.toCharArray(char_array, str_len);
    uint8_t c;
    for (int i = 0; i < str_len; i++) {
    c = char_array;
    if ( line_pos >= cols - 1 ) {
    exec_line();
    reset_line();
    char_to_line(c);*

    * }
    else if ( c == '\n' ) {
    // ignore '\n'
    }
    else if ( c == '\r' ) {_

    exec_line();
    reset_line();
    _ }
    else {_

    char_to_line(c);
    _ }
    }_

    exec_line();
    reset_line();
    _}
    // Arduino master setup*

    void oled::setup(void) {
    * // setup input buffer*
    #define LINE_MAX 30
    * uint8_t line_buf[LINE_MAX] = "U8GLIB Console";
    uint8_t line_pos = 0;*

    * // setup a text screen to support scrolling*
    #define ROW_MAX 12
    * uint8_t screen[ROW_MAX][LINE_MAX];
    uint8_t rows, cols;*

    * // line height, which matches the selected font (5x7)_
    #define LINE_PIXEL_HEIGHT 7*

* // set font for the console window*
* u8g.setFont(u8g_font_5x7);
//u8g.setFont(u8g_font_9x15);
_ // set upper left position for the string draw procedure*
* u8g.setFontPosTop();
// calculate the number of rows for the display*

* rows = u8g.getHeight() / u8g.getFontLineSpacing();_
if ( rows > ROW_MAX )
rows = ROW_MAX;
_ // estimate the number of columns for the display*
* cols = u8g.getWidth() / u8g.getStrWidth("m");_
if ( cols > LINE_MAX - 1 )
cols = LINE_MAX - 1;
clear_screen(); // clear screen*

* delay(1000); // do some delay*
* //Serial.begin(9600); // init serial*
* exec_line(); // place the input buffer into the screen*
* reset_line(); // clear input buffer*
}
oled screen(13, 11, 10, 9, 8);
void setup(void) {
* screen.setup()*
}
void loop(void) {
* screen.println("serdhfgjhvkbnlm/jkhgfdsfhcgjvbknlm;oyuitrudrcfgnkl;uoyiturydthfcgvbnkl;iouyituryedfcgvbn");*
* while (true) {};*
}

Do you expect people to read CODE that is written in italics and emoticons?

Please edit your message to use code tags.

David.