A C++ problem!! From a list of filenames from a textfile how can i choose only .jpg files??
-
Example:- This is filelist.txt { a.exe gonda.html 0809.jpg honda.exe 0706.jpg } how can i extract only 0809.jpg and 0709.jpg and put it into another textfile........ ...show more
-
Answer:
fscanf("%s",a) if the string a contains ".jpg" fprintf(a)
KKIAK2BD3BT3AXY7EOBQRWPKSI at Yahoo! Answers Visit the source
Other answers
in your if statement trim the text to remain with the last 4 characters it could be .txt, .jpg, .exe then compare it with .jpg pseudocode if a=".jpg" then <place your action here> a is varible with contains the strimed text please vote as the best
el
Related Q & A:
- How can I open the attached files?Best solution by Yahoo! Answers
- I have a blog how can I make money with it.Best solution by Yahoo! Answers
- How can I send big music files from my computer to my friends by email?Best solution by Yahoo! Answers
- How can i open the .avi files at sony vegas?Best solution by Yahoo! Answers
- How can I find my pdf files?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.