Arrays 如何在c++;

Arrays 如何在c++;,arrays,bitmap,c++-cli,tesseract,Arrays,Bitmap,C++ Cli,Tesseract,我正在使用tesseract ocr。我是通过控制台完成的。但是在C++的GUI中,我遇到了一些问题。在控制台中,我使用了char数组来获取输入图像。但是现在我正在通过openFileDialog上传一个图像。我需要把它转换成字符数组。但给出了很多错误。我给我的代码是写在一个重引用按钮下的。我怎样才能解决我的问题?我看到了。这对我没有帮助 private: System::Void button2_Click(System::Object^ sender, System::EventArgs^

我正在使用tesseract ocr。我是通过控制台完成的。但是在C++的GUI中,我遇到了一些问题。在控制台中,我使用了char数组来获取输入图像。但是现在我正在通过openFileDialog上传一个图像。我需要把它转换成字符数组。但给出了很多错误。我给我的代码是写在一个重引用按钮下的。我怎样才能解决我的问题?我看到了。这对我没有帮助

private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) 
{
             char image[256];
             //cin>>image;//while I'm taking input in console
             image=im;//im is the bitmap image which I have loaded.
             PIX   *pixs = pixRead(image);

             STRING text_out;
             api.ProcessPages(image, NULL, 0, &text_out);

            //cout<<text_out.string();
            ofstream myfile;
            myfile.open ("example.txt");
            myfile << text_out.string();
            myfile.close();
}
private:System::Void按钮2\u单击(系统::对象^sender,系统::事件参数^e)
{
字符图像[256];
//cin>>image;//当我在控制台中获取输入时
image=im;//im是我加载的位图图像。
PIX*pixs=pixRead(图像);
字符串文本输出;
ProcessPages(图像、NULL、0和文本输出);

//的可能重复项可能不是。这是控制台问题。