How do you......?

This is a discussion on How do you......? within the C++ Programming forums, part of the General Programming Boards category; I was wondering how to write a program in c++ using dev-c++ to access any other program such as the ...

  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    6

    Lightbulb How do you......?

    I was wondering how to write a program in c++ using dev-c++ to access any other program such as the internet or text document and then to be able to read an input and put it in a specific part of the program that was opened. I would also like to know how to search for web pages in a specific field and have the program read the text and save it into a file.
    But null out any page that was previously looked at.
    Thanks

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Quote Originally Posted by Jerdan View Post
    I was wondering how to write a program in c++ using dev-c++ to access any other program such as the internet
    Useful Links And Good Books
    or text document
    http://www.cprogramming.com/tutorial/lesson10.html
    and then to be able to read an input
    http://www.cprogramming.com/tutorial/lesson1.html
    and put it in a specific part of the program that was opened. I would also like to know how to search for web pages in a specific field
    http://www.google.com
    and have the program read the text and save it into a file.
    But null out any page that was previously looked at.
    I think there's a request you can send in http that says to proxy servers to not use the cached page but I'm not sure off the top of my head what it is.

  3. #3
    Registered User
    Join Date
    Sep 2007
    Posts
    6
    Sweet I will have to remember and look for that. Hopefully there is some type of library that will allow me to input the path of the program that I want to open.

    Also maybe there is a way to input a text into it seen as I know what program I will be opening I can insert \t untill I get to where I need to input the text.

    I need to open the program and keep a constant reference back and forth to it.

    And I have no idea how to do this or even where to begin.

  4. #4
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    Just learn the language, and concepts relating to I/O. A lot of the rest will follow.

  5. #5
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129

  6. #6
    Registered User
    Join Date
    Sep 2007
    Posts
    6
    I am taking a course in computer programming in coolege.
    I have learned alot of input output already and I have just gotten to try and work on a new project the only thing is the comiler error is saying this.

    23 wincl.lpszClassName = szClassName;

    [warning] unknown escape sequence '\p'
    [warning] unknown escape sequence '\w'

    Is there something wrong with line 23 or is there something else that I should be doing other than just opening a windows application project and typing in the path where the program is.

  7. #7
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    post a small non/compilable program that shows the problem.

  8. #8
    Registered User
    Join Date
    Sep 2007
    Posts
    6
    I used a regular windows aplication to compile the code and put in text("the path to my program");
    and then where ever else I needed to put in any text.
    I'm on another computer right now.
    Is there any way that I can call a program using a regular windows application?
    I looked at the message board for how to call a video file and it didn't work when I put in my own path.
    I will reply another message when I get back to my computer that has the DEV-C++ on it.

  9. #9
    Registered User
    Join Date
    Sep 2007
    Posts
    6
    Would the ifstream ( );
    and the ofstream();
    open a web browser with text and flash but not to use the flash?

  10. #10
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,046
    With a path like C:\Windows\notepad.exe, remember to escape the \s as \\ inside a string:
    Code:
    "C:\\Windows\\notepad.exe"
    ifstream and ofstream deal with files only. You can't execute programs with them.

    You should also have a look at the FAQ. You can use system() to execute a program; ShellExecute() to open a file with whatever the default program is for that file type.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  11. #11
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,246
    How do you... post a meaningful subject line?

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21