解决方案 »

  1.   

    把这些方法的dll封装成COM组件,调用即可
      

  2.   

    void QuestGraph::MolReader()
    {
    char answer = 'n';
    char ch[3] = {0};
    char lines[512] = {0};
    ifstream inFile;
    bool canOpen = false; // Open the mol file
    do
    { char filename[50]="01.txt" ;
    cout << "Input the mol file name of the QuestGraph: ";
    cin >> filename;
    inFile.clear();
    inFile.open(filename);
    if(!inFile)
    {
    cout << endl << "Fail to open mol file: " << filename;
    cout << endl << "Do you want to try again?"<< "\n"  
    <<"Type Y or y for yes; any other char for no: ";
    cin >> answer;
    if (answer != 'Y' && answer != 'y')
    {
    cout << endl << "The programme is closed!" << endl;
    exit(1);
    }
    }
    else
    {
    cout << endl << "Succeed open mol file: "
    << filename << endl << endl;
    canOpen = true;
    这个是C++编程的,我如何在winform中实现 char filename[50]=this.textbox.text
      

  3.   

    如果C++那个算法的dll,不是com规范的话,则用dllimport来载入方法