Can c++ save images to my HD or c++ code can't touch such?

Maybe c++ is limited, can c++ code be made that will save images to disk or affect other programs? Or is it self contained to its we little self and can only make programs with itself? If so, what language could I write that will save images to my HD and link them together ect?
can c++ code be made that will save images to disk or affect other programs?

Yes.
1. Maybe c++ is limited, can c++ code be made that will save images to disk or affect other programs?

Yes.

2. Or is it self contained to its we little self and can only make programs with itself?

No.

3. If so, what language could I write that will save images to my HD and link them together ect?

See the answer for #2.

Note: The word etcetera is abbreviated "etc", not "ect".

What is the command code to do such? It's not cout is it? I really really need to know...
Are you are asking how to save images to disk?
Well, see, I know how I'm going to code my AI invention, BUT, I need it to get images from the robot's camera and save them and do acceses like this and link images ect. Are the operation commands I'm looking for these below or no?:



The most important of the basic stream operations are:

First, the stream is initialized with the appropriate type (like a std::string for a stringstream and the filename for an fstream) of values and suitable modes (like ios::in for input and ios:: out for output and many more depending on the type of the stream).
After that, you can specify where the I/O should occur, through the get and put pointers. Depending on how you open the stream, the location may already be set appropriately (for example, if you open a file with ios::app, your get pointer set at the end of the stream, allowing appends).The member functions associated with setting the get and put pointers are:
seekg()and seekp() for .dragging. the get and put pointer, respectively, to the position specified. Both seek methods take an argument (of type streampos) providing a position in the file relative to the beginning of the file (using ios::beg), the end of the file (using ios::end), or the current position (using ios::cur). You may also provide just a specific location, such as io::beg, for the beginning of the file.
tellg() and tellp() provide the current location of the get and put pointers, respectively

The following one-liners should clear up most questions:
1
2
3
4
5
seekg(0); seekg(0,ios::beg); //sets the get pointer to the beginning.
seekg(5,ios::beg); //sets the get pointer to 5 chars forward of the beginning.
tellp(); tellg() //returns the current value of the put/get pointer
seekp(-10,ios::end); //sets the put pointer to 10 chars before the end
seekp(1,ios::cur); //proceeds to next char


N.B: Be careful when seeking the put pointer into the middle of in the stream. If you put anything in the stream, it will go directly into the stream at the put location, overwriting the previous contents. In other words, if you need to insert data in the middle of a stream, you have to manually move the data that would be overwritten. As a side note, if you're finding yourself doing that too often, then you may want to use a string representation of your data, which can simplify this kind of random access operation.
Once you're at the right location in the stream, input and output is done through the << and >> operators. If you want to input an object to the stream, use the << operator; for output, use >>. The class for your object must, of course, have provided overloads for these methods. Here's a short example:
1
2
3
4
5
6
//Inserts var into string (like objects are displayed by
// putting them to cout)
output_stream<<var;
//Gets the value from the stream's characters positioned
// after the get pointer and puts it into var.
input_stream>>var;


If var is an object (either a built in class or a user defined type), the exact process of the input or output is dependent on the overloaded >> or << operator respectively.
Last edited on
(First read my above reply.)
I need this to be done:
As each image is recorded and saved, I didn't have access to their names in the code beforehand, so how are they(each image frame) or all millions of 0s&1s going to be sent to a IF-Function and check if matches the special-image!? Plus I need a Function to get some of the image's 0s&1s and send em to motors.
Are the operation commands I'm looking for these below or no?:

Yes and no.

C++ doesn't know anything about images. You either need to deal with and program the specifics yourself, or use a third party library to do it for you. You should probably also work on your google-fu if you want to continue on this path.
Search-Tree would beat Google-fu though***

Can't I set the above operation to get images just saved and have them check if match and also send them to a function to take certain 1s&0s and send these to motors?
Last edited on
Topic archived. No new replies allowed.