|
|
#1 (permalink) |
|
Moderator
![]() Join Date: Mar 2006
Location: Cairo
Age: 21
Posts: 2,362
|
Code:
#include <fstream>
#include <iostream>
#include <string>
using namespace std;
int main()
{
string c,d = "";
fstream reads("R0_1st.txt",ios::in);
fstream writes("new.txt",ios::in|ios::out);
reads.unsetf(ios::skipws);
while ( getline ( reads, c ) ) {
cout<<c<<endl;
if ( c.find ( "Adiabatic Efficiency" ) != string::npos )
{
cout<<">>>>>>>>>>>>>>>"<<endl; //Just to make sure it got here
while( getline (writes,d) )
{
if ( d.find ("replace here") != string::npos )
{
cout<<"<<<<<<<<<<<<<<<"<<endl; //Just to make sure it got here
writes<<c;
}
}
}
}
return 0;
}
__________________
Phenom X4 9850 BE Gigabyte GA-MA790X-DS4 2GB Kingston DDR2 800 Radeon HD 3450 WD5000AAKS 500 GB |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need table code | New_compforum_user | General Software | 2 | 05-11-2006 07:42 PM |
| How do I add PHP code into my HTML web template? | Liam | Internet Discussion | 4 | 02-16-2006 09:04 PM |
| does anyone have a windows 95 key code | madyalper | Operating Systems | 6 | 02-05-2006 03:57 PM |
| network cmd code too... | lerner | Internet Discussion | 6 | 09-22-2005 07:44 PM |
| Code 19 error on both disk drives | lonergamefreak | CD/DVD Technology | 1 | 05-04-2005 01:23 PM |