Sefmentation Fault

This is a discussion on Sefmentation Fault within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by dpp well yes i am getting segmentation fault...but tat is the reason i used maps the complete ...

  1. #31
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by dpp View Post
    well yes i am getting segmentation fault...but tat is the reason i used maps


    the complete code is already found in #19
    Except your complete code is nowhere containing your sequence from post #22 - so unless it's entirely clear from the posted code snippets, you would have to post "more code".

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  2. #32
    dpp
    dpp is offline
    Registered User
    Join Date
    Jan 2009
    Posts
    197
    well in #22 i explained my scenario not my code...

    but in #19 u can find the entire code

    i am refering to this part
    Code:
    while(altnum_Nodes)
            {
                //  cout<<"\n CITY\n";
                cin>>str2[j];
                scanf("%I64d",&altnum_Edges[j]);
                num_Edges+=altnum_Edges[j];
                for(i=0;i<altnum_Edges[j];i++)
                {
                    v1[k]=j+1;
                    scanf("%I64d",&v2[k]);
                    scanf("%I64d",&alt);
                    elements[v1[k]+v2[k]+v1[k]*v2[k]]=alt;
                    k++;
                }
                altnum_Nodes--;
                j++;
            }
    which is in #19..i took this part and explained the scenario in #22

  3. #33
    dpp
    dpp is offline
    Registered User
    Join Date
    Jan 2009
    Posts
    197

    Smile

    well tat is it i have no more code


    well maybe to add fursther i can provide u with i/p and bounds
    no.of testcases
    no.of nodess

    node name

    no.of adjacent nodes

    adjacent node and its weight -bound


    no.of paths to find -bound


    source 1 dest 1
    .


  4. #34
    dpp
    dpp is offline
    Registered User
    Join Date
    Jan 2009
    Posts
    197
    i cud not find my bug stil.. i am not sure where am getting seg fault... if i increase maxnodes and maxedges i get some memory prob....
    else i get seg fault...its driving me mad

    i have posted enuf requirements even my entire code...
    but no suggestions on it stil
    Last edited by dpp; 01-21-2009 at 09:38 AM.

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. weird seg fault
    By Vermelho in forum C Programming
    Replies: 3
    Last Post: 05-10-2008, 09:27 PM
  2. Segmentation fault
    By NoUse in forum C Programming
    Replies: 4
    Last Post: 03-26-2005, 03:29 PM
  3. Locating A Segmentation Fault
    By Stack Overflow in forum C Programming
    Replies: 12
    Last Post: 12-14-2004, 01:33 PM
  4. Segmentation fault...
    By alvifarooq in forum C++ Programming
    Replies: 14
    Last Post: 09-26-2004, 01:53 PM
  5. segmentation fault and memory fault
    By Unregistered in forum C Programming
    Replies: 12
    Last Post: 04-02-2002, 11:09 PM

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