时间:2010-07-24 15:57:07

标签: c++ benchmarking stdvector

3 个答案:

答案 0 :(得分:1)

答案 1 :(得分:1)

答案 2 :(得分:0)

我创建一个,看看:

#include <iostream>
#include <cstdlib>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <sstream>

int main(int argc, char* argv[]){
    if (argc < 2){
        printf("No arguments found\n");
        exit(1);
    }
    int maxi;
    maxi = atoi(argv[1]);
    int * a;
    a = new int [5];

    std::stringstream ss;
    ss << maxi;
    printf(ss.str());
    printf("\n");
}