1 Replies - 303 Views - Last Post: 01 June 2009 - 10:44 AM Rate Topic: -----

#1 dhimans  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 01-June 09

Modify a text file in C

Posted 01 June 2009 - 09:49 AM

Hi all ,
I urgently need some help in C. I wish to modify the numerical contents of a Text file . The text file data looks somewhat like this (except the numerical data is large)

((plate_top point 150)
(x
3.9866667
3.96
3.9333334
3.9066668
)
(y
0
0
0
0
)
(heat-transfer-coef
40.616283
40.837292
40.756935
40.756359
)
)

I need to modify the numerical contents under ,heat-transfer-coef, by multiplying it by some factor

Please help me develop a simple code for it.
Your help would be most appreciated

regards
dhiman

Is This A Good Question/Topic? 0
  • +

Replies To: Modify a text file in C

#2 IngeniousHax  Icon User is offline

  • |>|20-514<|{3|2

Reputation: 78
  • View blog
  • Posts: 1,362
  • Joined: 28-March 09

Re: Modify a text file in C

Posted 01 June 2009 - 10:44 AM

add code tags...And here at DIC we have a good faith best effort policy. Write something up and well help you along the way.
#include <iostream>

int main() {
int x = 0;
for(int i = 1, i > x; i++) {
	cout <<"We don't do your work for you." << endl;
	cout <<"We help you with your problems" << endl;
	x++ 
	}
return 0;
}


This post has been edited by IngeniousHax: 01 June 2009 - 10:45 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1