私は問題がありますが、それは何か分かりません。コードをコンパイルするとエラーが発生します(いくつかのgnuplotが含まれています)。ファンシーベクトルのエラー宣言プロトタイプ
#include <iostream>
#include <fstream>
#include <vector>
#include <map>
#include <string>
#include <math.h>
#include "gnuplot_i.hpp"
using namespace std;
typedef struct DATA{
char Label[50]; //title
vector<double> y,SD; //y data point SD sigma
}DATA;
typedef map<int, double> Episode;
typedef map<int, Episode> Stat_run;
double GetAvg(double *Array, int Count, double *stddev);
void wait_for_key();
void plotMyLines(DATA *Data, vector< std::map<int, map<int, double> > > Points, int printsteps, double Y1, double Y2, int episode, int run);
void PlotLines(const char *Outfile, vector<double> x, DATA *Data, int Lines, const string &xlabel, const string &ylabel, double Y1, double Y2);
int main()
{
vector<Stat_run> Points;
Stat_run exp1; Episode eps;
Stat_run exp2; Episode eps2;
}
私は自分のコードの大部分を削除しました。目的は、結果をフォーマットしてプロット関数に送ることです。私はシンプルに見えるエラーを受けますが、2時間のテストの後、どこに問題があるのかわかりません。エラー:
error: expected ‘,’ or ‘...’ before ‘-’ token
plotMyLinesとPlotLinesのプロトタイプでこのエラーが発生します。どんなヒントもありがとう!
スニペットはあなたには、いくつかのコンパイラの情報を追加したい場合がありますGCC 4.6.1でコンパイル罰金などは、以下のコンパイル。また、なぜCスタイルの構造体定義を使用していますか? – pmr