By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,483 Members | 1,039 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,483 IT Pros & Developers. It's quick & easy.

capture a photo

P: n/a
BH
how can I capture a photo in C++ via a video cam?
Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
BH wrote:
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);
}
----------------------------------------------

- Adam

--
Reverse domain name to reply.

Jul 22 '05 #2

P: n/a

"BH" <bb*@cc.com> wrote in message news:bt**********@www.csis.hku.hk...
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
Jul 22 '05 #3

P: n/a

"BH" <bb*@cc.com> wrote in message news:bt**********@www.csis.hku.hk...
how can I capture a photo in C++ via a video cam?

Push the button.

Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.