22.04.2013 Views

GAMS Data Exchange API

GAMS Data Exchange API

GAMS Data Exchange API

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example 3: C++ program<br />

Page 18<br />

exit(1);<br />

}<br />

void Write<strong>Data</strong>(GDX &PGX, const std::string &s, const double V) {<br />

Indx[0] = s;<br />

Values[GMS_VAL_LEVEL] = V;<br />

PGX.<strong>Data</strong>WriteStr(Indx,Values);<br />

}<br />

int main (int argc, char *argv[]) {<br />

std::string Msg, FileName, Producer, Sysdir, VarName;<br />

int ErrNr;<br />

int VarNr;<br />

int NrRecs;<br />

int N;<br />

int Dim;<br />

int VarTyp;<br />

int D;<br />

if (argc < 2 || argc > 3) {<br />

cout

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!