Reading Strings From a File

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2007
Posts: 24
Reputation: k88joshi is an unknown quantity at this point 
Solved Threads: 0
k88joshi k88joshi is offline Offline
Newbie Poster

Re: Reading Strings From a File

 
0
  #11
Jan 29th, 2009
Sorry acted should be " after"
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 671
Reputation: Freaky_Chris is a jewel in the rough Freaky_Chris is a jewel in the rough Freaky_Chris is a jewel in the rough 
Solved Threads: 113
Freaky_Chris's Avatar
Freaky_Chris Freaky_Chris is offline Offline
Practically a Master Poster

Re: Reading Strings From a File

 
1
  #12
Jan 29th, 2009
So replace ".World" with ".Earth"
??

Chris
Knowledge is power -- But experience is everything
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 483
Reputation: DangerDev has a spectacular aura about DangerDev has a spectacular aura about 
Solved Threads: 58
DangerDev's Avatar
DangerDev DangerDev is offline Offline
Posting Pro in Training

Re: Reading Strings From a File

 
1
  #13
Jan 29th, 2009
do you want to create tool for this? if yes then try using regular expression.
Freedom in the Mind, Faith in the words.. Pride in our Souls...
Indian Developer
http://falaque.wordpress.com/
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 675
Reputation: Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold 
Solved Threads: 100
Sky Diploma's Avatar
Sky Diploma Sky Diploma is offline Offline
Practically a Master Poster

Re: Reading Strings From a File

 
1
  #14
Jan 29th, 2009
Originally Posted by Rashakil Fol View Post
No, that would be dumb -- you would end up breaking anything with the same name that belonged to another class.
Well when thats what he wanted. I guess thats what we should give. Hence it isnt dumb in any way.


If i had to classes hello and world with member apple.

i would search for hello.apple but not only for apple.
1. Please Mark Your Thread as Solved After Getting Your Answers.
2. Please Use CODE TAGS .
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 24
Reputation: k88joshi is an unknown quantity at this point 
Solved Threads: 0
k88joshi k88joshi is offline Offline
Newbie Poster

Re: Reading Strings From a File

 
0
  #15
Jan 29th, 2009
Yes , that's the main thing there are so many classes that it is impossible to save them in an array but some variable names through these classes are same these variable names could be stored in an array. However, this is why it is necssecary to only look for the word "World" rather than the whole word "Hello.Wordl" and replace it with "Earth" resulting in "Hello.Earth".
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2,052
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: Reading Strings From a File

 
3
  #16
Jan 29th, 2009
that's the main thing there are so many classes that it is impossible to save them in an array but some variable names
We're getting somewhere. Is there a particular reason you need to write this in C++? Would a solution that doesn't use C++ suffice?
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 24
Reputation: k88joshi is an unknown quantity at this point 
Solved Threads: 0
k88joshi k88joshi is offline Offline
Newbie Poster

Re: Reading Strings From a File

 
0
  #17
Jan 29th, 2009
Yes totally ...
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2,052
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: Reading Strings From a File

 
2
  #18
Jan 29th, 2009
So just run something like
  1. perl -pi -e 's/foo/bar/g' *.cpp *.h
in every directory. Or maybe something like
  1. find . -name "*.cpp" | xargs perl -pi -e 's/foo/bar/g'
assuming you're running in a unix-like environment. I'm sure you could do something similar in Windows. (Note that 'find' is different on Windows.)

For tasks like this, C++ is not the ideal language.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 24
Reputation: k88joshi is an unknown quantity at this point 
Solved Threads: 0
k88joshi k88joshi is offline Offline
Newbie Poster

Re: Reading Strings From a File

 
0
  #19
Feb 2nd, 2009
I do not understand what you mean by the above post .. could you please explain?

This help would be Great....!!!
Kamal Joshi
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2,052
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: Reading Strings From a File

 
2
  #20
Feb 2nd, 2009
I am talking about using commands like perl, xargs, and find, from the command line. You might need to install software if you want to use these on Windows.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC