File stream in a particular line in excel | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

File stream in a particular line in excel

I have a project in which i have to create a student report program. I am storing the data in an excel file. My problem is, if the user wants to change a particular record, which is at a random line between all the other stored data. How will the file store it back? so basically, how to bring the 'put' pointer at the start of any particular line?

6th Jan 2018, 7:35 PM
Chirag Bansal
Chirag Bansal - avatar
1 ответ
0
int i=1; char line[101]; ifstream imyobj; imyobj.open(location); Assume you want to go to 5th line for(i=1;i<=4;i++) { imyobj.getline(sent,101,'\n'); } Here you got it now imyobj is pointer to nextline at first character.
6th Jan 2018, 10:02 PM
Fahad
Fahad - avatar