| | |
Reading Strings From a File
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
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/
Indian Developer
http://falaque.wordpress.com/
•
•
•
•
No, that would be dumb -- you would end up breaking anything with the same name that belonged to another class.
If i had to classes hello and world with member apple.
i would search for hello.apple but not only for apple.
•
•
Join Date: Nov 2007
Posts: 24
Reputation:
Solved Threads: 0
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".
So just run something like
in every directory. Or maybe something like
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.
C++ Syntax (Toggle Plain Text)
perl -pi -e 's/foo/bar/g' *.cpp *.h
C++ Syntax (Toggle Plain Text)
find . -name "*.cpp" | xargs perl -pi -e 's/foo/bar/g'
For tasks like this, C++ is not the ideal language.
![]() |
Similar Threads
- Need help reading a txt file into C++ (C++)
- reading .csv file and getting the data out of it (Java)
- Reading .dat file data into an array (C#)
- Setting an array and reading in a txt file backwards (C++)
- Read file with unknown buffer length (C)
- reading a file using fscanf (C)
- Reading a input file (C)
- help reading from .txt file (C++)
- Parsing a file for multiple info in PERL (Perl)
- Need Help Reading a csv file created from MSExcel (C)
Other Threads in the C++ Forum
- Previous Thread: Execute 2 for loops at the Very same time
- Next Thread: Need help with ascending numbers program.
| Thread Tools | Search this Thread |
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer dll download dynamiccharacterarray email encryption error file format forms fstream function functions game generator givemetehcodez graph gui homeworkhelp iamthwee ifstream image input int java lib library list loop looping loops map math matrix memory multiple newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






