capture a photo

A

Adam Fineman

BH said:
how can I capture a photo in C++ via a video cam?
I believe the following code fits your requirements:

----------------------------------------
// capture.cpp
#include <string>
#include <iostream>

using std::string;

void video_cam(string& container, const string& contained);

int
main()
{
string s = "C++";

video_cam(s, "photo");

std::cout << '\'' << s << '\'' << '\n';

return 0;
}


void
video_cam(string& container, const string& contained)
{
string::size_type mid = container.size() / 2;
container.insert(mid, contained);
}
 
C

Chris Theis

BH said:
how can I capture a photo in C++ via a video cam?

You´ll have to write an application for this as there is no
"GetMeAPictureAutomatically()" function available in C++ and any other
language that I know of. Check out any OS specific libraries and APIs that
allow you to control your video cam.

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,883
Members
47,414
Latest member
djangoframe

Latest Threads

Top