Thread: Tracert Command

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    27

    Tracert Command

    Hey

    Right well i was doing the tracert command the other day and thought while i was learn C++ i would make a little program that would allow me to do it.

    This is the code i have so far:

    Code:
    #include <iostream>
    #include <stdlib.h>
    
    int main(int argc, char *argv[])
    {
      system("tracert www.thesims.co.uk");
      system("PAUSE");	
      return 0;
    }
    Well that doesn't work

    All it says is press any key to continue.

    I would like it so it works but also not have that domain there and just allow me to type in a domain and off it goes. I mean any domain not just that one.

    Any help on this would be great!

    Thanks

    ..::ChRiS::..

  2. #2
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    whats the iostream for? this looks like C to me

    edit: even if it was c++ you're not using cout or cin anything
    Last edited by moi; 08-05-2002 at 06:22 PM.
    hello, internet!

  3. #3
    Registered User
    Join Date
    Jul 2002
    Posts
    27
    Dev C++ program put that in it.

  4. #4
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    considering you don't use it at all...

    anyway it compiles and runs fine for me so i dont know what to tell you.
    hello, internet!

  5. #5
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231

    Re: Tracert Command

    >Well that doesn't work
    >All it says is press any key to continue.
    Does the tracert command work if you enter it manually?

    >tracert www.thesims.co.uk
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 26
    Last Post: 07-05-2010, 10:43 AM
  2. problem with "touch" command in c program
    By Moony in forum C Programming
    Replies: 10
    Last Post: 08-01-2006, 09:56 AM
  3. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM
  4. Ping problem
    By bladerunner627 in forum C++ Programming
    Replies: 12
    Last Post: 02-02-2005, 12:54 PM
  5. exe files in -c- language
    By enjoy in forum C Programming
    Replies: 6
    Last Post: 05-18-2004, 04:36 PM