Click here to Skip to main content
15,891,712 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello!

I googled it, but I only found resolution in C#.
I have to do my homework in C, and I hove no idea, how can I open with a C program a picture with the operating system's default image viewer.

The pictures names are in a *.txt file in a column, and the user has to chosse, which one he want to open.

Please help!
Posted

1 solution

Have a look at the ShellExecute[^] function.
 
Share this answer
 
Comments
Freedy23 25-Nov-12 8:05am    
Thank you for your answer!
To my knowledge, the school will test the code on linux.
Is there some universal solution? Or every type of operating system need a unique solution?
OriginalGriff 25-Nov-12 8:24am    
Each type will need a unique solution (probably!)
For Linux, try execv
http://linux.about.com/library/cmd/blcmdl3_execv.htm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900