Like Tree1Likes
  • 1 Post By Salem

Whats the problem?

This is a discussion on Whats the problem? within the C Programming forums, part of the General Programming Boards category; I used netbeans to build and run this. I builds successfully but when i give run it is not running. ...

  1. #1
    Registered User
    Join Date
    Nov 2012
    Posts
    2

    Question Whats the problem?

    I used netbeans to build and run this. I builds successfully but when i give run it is not running. what's the problem? What mistake I made? Do I have to give input or something in the codes? Please help me. I'm not so good in programming, but i need to solve this.
    Attached Files Attached Files
    Last edited by Bibin; 11-08-2012 at 12:00 AM.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,590
    Just so we're clear, you took the code from here -> http://svn.sdstrowes.co.uk/pub/longest-prefix/tree.c

    > What mistake I made?
    Downloading code you have no clue about

    > Do I have to give input or something in the codes?
    Apparently, yes.

    > Please help me. I'm not so good in programming, but i need to solve this.
    Solve what?

    It seems to me that you googled for tree source code, and attached yourself limpet-style to the first one you found. You've no idea whether this particular implementation of tree solves your problem.

    And we've no idea if this solves your problem, because you haven't told us what it is you're trying to solve.
    rags_to_riches likes this.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Nov 2012
    Posts
    2
    yes i downloaded the code from that site. I didn't mean to hide it, that's why I didn't edit those introductions in the coding.

    I want code for finding longest matching prefix inorder to solve the IP address lookup. I know the concept but I don't know coding. so I downloaded this code.

    If u know tell me how to give input and get the output for this coding.

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,590
    > If u know tell me how to give input and get the output for this coding.
    This line seems to be a big give away.
    fprintf(stderr, "Usage: %s -f prefix_file [-d]\n\n", name);

    If you couldn't figure this out, how do you know the input format the program expects is the same as the input format you have?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. I'm new to this ;(, whats the problem with this????????
    By MrHoboMe in forum C++ Programming
    Replies: 6
    Last Post: 12-07-2010, 03:26 PM
  2. strcmp problem, whats the problem, i cant figure it out!
    By AvaGodess in forum C Programming
    Replies: 14
    Last Post: 10-18-2008, 06:45 PM
  3. whats the problem....
    By vapanchamukhi in forum C Programming
    Replies: 3
    Last Post: 09-05-2008, 12:19 PM
  4. Whats my problem here?
    By SebastionV3 in forum C++ Programming
    Replies: 18
    Last Post: 05-05-2006, 10:16 PM

Tags for this Thread


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