Tuesday, September 27, 2011

Where is the problem?

I can't do anything after the window showed.
After i pressed keys(No matter what the key) twice, window closed.
Anyone can help me?
Here is my test code..

#include "keys.h"
#include "console.h"
using namespace cio;

int main(){
  bool insertMode = true;
  int strOffset = 10;
  int curPosition = 5;
  char str[80] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  str[20] = 0;
  Console C;
  C.display("****************************", 9, 9, 20);
  //C.display("*****************", 10, 9, 20);
  C.display("****************************", 11, 9, 20);
  C.edit(str, 10, 10, 15, 79, &insertMode, &strOffset, &curPosition);
  //C.display(str, 15, 0);
  C.pause();
  return 0;
}