我是初学者,现在有许多(有15个)类似如下的程序,都得出并且打印出结果cj[1][6],因为代码量的限制,不能写在同一个程序中,否则不能通过编译。#include <vector>
#include <iostream>
#include <set>
#include <algorithm>
#include <iomanip>
using namespace std;
const int row=1000,col=1000 ;
int cj[row][col];
int main()
{
…………….
                      cout<<setw(7)<<cj[1][6];       
   
    return 0;
}我想通过主程序调用这些独立的程序,把各个程序的cj[1][6]的结果累加并且打印出,是不是通过调用DLL,能否详细的告诉怎样做?我不会,谢谢!如果编译通过给100分。

解决方案 »

  1.   

    #include <vector.h>
    #include <iostream.h>
    #include <set.h>
    #include <algorithm.h>
    #include <iomanip>
    应该是这样
      

  2.   

    我的意思是怎样把下面这段代码写成DLL,然后用主程序调用它,具体怎样做#include <vector>
    #include <iostream>
    #include <set>
    #include <algorithm>
    #include <iomanip>
    using namespace std;
    const int row=1000,col=1000 ;
    int cj[row][col];
    int main()
    {
    …………….
                          cout<<setw(7)<<cj[1][6];       
       
        return 0;
    }
      

  3.   

    你自己都给了答案了,写成dll,主程序调用