some questions

Once again, I have amassed some questions.

-Besides not needing to completely copy an object, what other uses does a pointer have that can't be done in some other way?

-Is it possible to see the ml of your .exe when you compile?

-Is it possible to make a program that when compiled, turns it into another language,like say ruby?

-how do you read a certain line from an opened file from <fstream>?

-I made a text editor and have four questions
*How do you make it so that you can actually take input; meaning when I press enter it won't end letting me input?
*I made a delete option but how would I be able to do that?
*Is it possible to enter a path to store the file in?
*Can you use a command to make a file?

-I can't find any sites to teach me the following (suggestions please)
*javascript and calling it in c++
*same with lua
*how to write php
Besides not needing to completely copy an object, what other uses does a pointer have that can't be done in some other way?
One would be you have to interface with a piece of hardware. It has a base VME address that you set in your program to access is memory.
Is it possible to see the ml of your .exe when you compile?
If you mean machine language (ml), then yes. With g++ the -S option will output the assembly for the input file. Check you compiler's options to see what it is for you.
how do you read a certain line from an opened file from <fstream>?
If the file is binary, then seekg() n*sizeof(struct yourFormat) to get to the n-th record. If it is ascii then you would have to read in each line and count the lines read until you get to the line number you want.

Don't have any answers for the rest.
-Besides not needing to completely copy an object, what other uses does a pointer have that can't be done in some other way?

Using more memory than you have in the stack.
Polymorphism.

Is it possible to make a program that when compiled, turns it into another language,like say ruby?

Yes. You'll probably need to write your own C++ to Ruby compiler.
Last edited on
Topic archived. No new replies allowed.