[問題] c++風格的fprintf
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
g++
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
FILE f=popen("gnuplot -persistent","w");
fprintf(f,"plot '-'")
fprintf(f,"%f %f",var[1],var[2]);
請問上述寫法有沒有比較C++風格的方式?
比方說
f << var ;
之類的?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.113.56.25
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1448127279.A.968.html
→
11/22 01:55, , 1F
11/22 01:55, 1F
※ 編輯: PhysiAndMath (140.113.56.25), 11/22/2015 02:14:44
推
11/22 11:43, , 2F
11/22 11:43, 2F
推
11/22 12:06, , 3F
11/22 12:06, 3F
推
11/22 15:06, , 4F
11/22 15:06, 4F