Results 1 to 3 of 3
  1. #1
    schim's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    My chair
    Posts
    367
    Reputation
    10
    Thanks
    115
    My Mood
    Twisted

    [QUESTION] echo system >> buffer ?

    I'm building a C++ at the moment that needs to forward a few dos operations (netstat and pinging) But I need to read them into a buffer, and I don't want to do it the long way:

    C:\someuser\somedir: netstat >> filebuffer.txt

    and then read from it, please tell me there's a faster way of doing this!
    Like doing something like this:

    char buffer[1000];

    system("netstat >> ", buffer);

    Anyone?

  2. #2
    Kallisti's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,019
    Reputation
    52
    Thanks
    376
    My Mood
    In Love
    try

    [php]
    cin >> buffer[1000]; //website to ping or whatever
    system(("ping") buffer[1000]);

    //or try this
    string websiteToPing;
    cin >> websiteToPing
    system(("ping") websiteToPing);[/php]

    tell me if it works?
    Last edited by Kallisti; 09-06-2010 at 03:26 AM.

    未来が見えなくて怖いから
    未来が見えてしまって悲しいから
    目を閉じて優しい思い出に浸ってしまう




  3. #3
    schim's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    My chair
    Posts
    367
    Reputation
    10
    Thanks
    115
    My Mood
    Twisted
    No dude, I don't have to try that to tell that it won't work...
    this:
    system("netstat >> ", buffer);
    Was just to server as an example, this is not possible in any way...
    I appreciate your help though

Similar Threads

  1. X box System Question
    By dondig in forum XBOX General Discussion
    Replies: 17
    Last Post: 12-07-2010, 05:43 PM
  2. New voting system question.
    By Ethereal in forum Art & Graphic Design
    Replies: 41
    Last Post: 07-24-2010, 06:37 PM
  3. Question!!! Abaut new anti hack system!
    By combats in forum Combat Arms Help
    Replies: 6
    Last Post: 05-04-2010, 05:45 PM
  4. A question about system requirements
    By machinesinger in forum General
    Replies: 2
    Last Post: 04-16-2009, 03:47 PM
  5. Photoshop Question
    By arunforce in forum Art & Graphic Design
    Replies: 6
    Last Post: 01-15-2006, 11:38 AM