<div dir="ltr">Dear SCIP members,<div><br></div><div>I have tried functions of fstream and SCIP_FILE to open a file for SCIPgetBestSol(), and they do not work.</div><div>Is there any example to define a file for
SCIPgetBestSol() or is there another way to do so using C++?</div><div><br></div><div>Sincerely,</div><div><br></div><div>Melvin shih</div><div><br></div><div><br></div><div>Here are my codes:<br></div><div>.............</div><div>// fstream file;<br>// file.open("Reader.txt", ios::out | ios::trunc); //not work<br><br></div><div> SCIP_FILE* schedulingfile;<br> char filename[255];<br> (void)SCIPsnprintf(filename, 255, "Sintex.txt");<br> schedulingfile = SCIPfopen(filename, "r");<br> if (schedulingfile == NULL)<br> {<br> SCIPerrorMessage("cannot open file <%s> for reading\n", filename);<br> SCIPprintSysError(filename);<br> return SCIP_NOFILE;<br> }<br> if (SCIPgetNSols(scip) > 0)<br> {<br> SCIPinfoMessage(scip, NULL, "\nSolution:\n");<br> SCIP_CALL(SCIPprintSol(scip, SCIPgetBestSol(scip), schedulingfile, FALSE)); //SCIP_FILE is not accepted<br> }<br> SCIPfclose(schedulingfile);<br></div><div>..........</div><div><br></div></div>