How to change structure data written in the file. in v++
-
Hello All, I have structure student{ char name[10]; int id ; }; int main() { student s ; ///filling data to s //writting s to file temp.dat //reading s from temp.dat } Now i want to change s.name . what should i do thanks all.
-
Hello All, I have structure student{ char name[10]; int id ; }; int main() { student s ; ///filling data to s //writting s to file temp.dat //reading s from temp.dat } Now i want to change s.name . what should i do thanks all.
_tcscpy(s.name, _T("Hello"));
? Are you looking for something else?It is a crappy thing, but it's life -^ Carlo Pallini
-
_tcscpy(s.name, _T("Hello"));
? Are you looking for something else?It is a crappy thing, but it's life -^ Carlo Pallini
Sorry sir, it doesn't fit on UNICODE builds. ;P You may use _T("hi"), however... :rolleyes: :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Sorry sir, it doesn't fit on UNICODE builds. ;P You may use _T("hi"), however... :rolleyes: :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]Well, that's an essay for another time. Use
TCHAR
instead ofchar
while writing code on Windows. :)It is a crappy thing, but it's life -^ Carlo Pallini
-
_tcscpy(s.name, _T("Hello"));
? Are you looking for something else?It is a crappy thing, but it's life -^ Carlo Pallini
thanks for reply please see my new post