chcem sa opytat ci ked si do premennej typu std::string ulozim nejaky retazec, mozem ho potom pouzit ako argument fcie fopen takto fopen(ta moja premenna, "r")?
dik za odpoved
Mozes, fopen vsak prijma char *, preto pouzi metodu c_str(), ktora ho vracia:
fopen(retazec.c_str(), "r");
_________________ Empty your memory, with a free()… like a pointer! If you cast a pointer to an integer, it becomes the integer, if you cast a pointer to a struct, it becomes the struct… The pointer can crash…, and can overflow… Be a pointer my friend…