How do I open JPG files?

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

Was this solution helpful to you?

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:

Just Added Q & A:

Find solution

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.