Search:

Type: Posts; User: JJJIrish05

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. added the deletes to fix that stuff..... ...

    added the deletes to fix that stuff.....

    &u->data prints out 0 and u->data seg faults.... why?

    I'm using gcc on a linux machine to compile, never used a debugger
  2. well thats pretty cruel..... thanks for the help...

    well thats pretty cruel..... thanks for the help you did give me

    guess i'll hope someone else is willing to figure out why color[u->data]="gray"; is causing a seg fault, or i'll seek help...
  3. - thats just ugly and more work than required and...

    - thats just ugly and more work than required and since its now almost 2 a.m. and i'm running on 2 hours of sleep definately feeling lazy :-P
    - actually the assignment description says to call them...
  4. i have extra couts in there to find the seg fault...

    i have extra couts in there to find the seg fault so you can just ignore them....


    #include <iostream>
    #include <iomanip>
    #include <cstdlib>

    using namespace std;
  5. -multiple functions modifying them, so only way I...

    -multiple functions modifying them, so only way I know
    -hw assignment and thats what they said to use, lol, its for an algorithms class so they know what they are supposed to be (pi=parent,...
  6. u->data is causing a seg fault...... why? in...

    u->data is causing a seg fault...... why?

    in particular the first time i think it is used is in (where i know it is causing the seg fault)

    color[u->data]="gray";

    in DFS_Visit

    any thoughts?
  7. http://dwks.theprogrammingsite.com/myprogs/cfonlin...

    http://dwks.theprogrammingsite.com/myprogs/cfonline.htm
  8. Yes, I want it to be an array of pointers...

    Yes, I want it to be an array of pointers (Nodes)..... How do I do that then?
  9. Ah thanks! But &graph[i]=NULL; still...

    Ah thanks! But


    &graph[i]=NULL;

    still gives the error:
  10. Rusty with c++ need some help with errors involving pointers and stuff

    Bit rusty with C++ and not sure how to fix these errors i'm getting. Any help is much appreciated!!!

    Here's the errors:

    DFS.cpp: In function 'void DFS(Node*)':
    DFS.cpp:64: error: cannot...
  11. Replies
    20
    Views
    2,142

    well figured out the out of bounds error..... but...

    well figured out the out of bounds error..... but the algorithm doesn't seem to work.... so gotta go figure that out :-P

    thanks!
  12. Replies
    20
    Views
    2,142

    well if it is c99 why is it working?.... ya i...

    well if it is c99 why is it working?.... ya i assumed it was an out of bounds.... just struggling to find it....
  13. Replies
    20
    Views
    2,142

    they said C++.....

    they said C++.....
  14. Replies
    20
    Views
    2,142

    ok so it works now except one thing..... The...

    ok so it works now except one thing.....

    The array before sorting: 4 3 2 1
    The array after sorting: -708361232 1 2 3

    trying to figure it out.... can anyone else spot it?
  15. Replies
    20
    Views
    2,142

    oh ya.... lol... 1 is supposed to be 0.... let me...

    oh ya.... lol... 1 is supposed to be 0.... let me change that....
  16. Replies
    20
    Views
    2,142

    why do i have to use one of those? couple sites...

    why do i have to use one of those? couple sites i've looked at said the way I did is the way to do it.... why shouldn't it work and how exactly do i declare it? int[] A = new int A[len] or something...
  17. Replies
    20
    Views
    2,142

    compiles fine for me using gcc.... so then how am...

    compiles fine for me using gcc.... so then how am i supposed to declare it?
  18. Replies
    20
    Views
    2,142

    why? is that not how you declare arrays in c++? ...

    why? is that not how you declare arrays in c++? It compiles fine and takes in the numbers and prints them out....
  19. Replies
    20
    Views
    2,142

    #include #include #include...

    #include <iostream>
    #include <iomanip>
    #include <cstdlib>

    using namespace std;


    int operationsCounter=0;

    void maxheapify(int A[], int i, int len)
  20. Replies
    20
    Views
    2,142

    I printed out the array before and after and it...

    I printed out the array before and after and it comes out the same.... (not sorted)
  21. Replies
    20
    Views
    2,142

    Array manipulation Question

    Ok so i'm writing a program to sort an array using heap sort. I have my main function that gets the information on what the array is, then using a function to sort it. The function is defined as:...
  22. Replies
    9
    Views
    3,439

    ok.... it compiles.... but it seems to be getting...

    ok.... it compiles.... but it seems to be getting hung up somewhere and I can't figure out where..... any good programs to use to figure out where and why its getting hung up? Or anyone willing to...
  23. Replies
    9
    Views
    3,439

    ah..... well actually i did work those errors...

    ah..... well actually i did work those errors out.... but what are the system calls equivalent to fgets and fputs?
  24. Replies
    9
    Views
    3,439

    my code is rather long... is there a limit at how...

    my code is rather long... is there a limit at how long of code we're allowed to post? should i just attach a file?
  25. Replies
    9
    Views
    3,439

    Couple errors please help :-D

    Error 1: backup.c:54: error: 'stdbackup' was not declared in this scope
    stdbackup declaration: void stdbackup(char* origPath, char* backupPath)
    call to stdbackup: stdbackup(dir_to_copy,...
Results 1 to 25 of 27
Page 1 of 2 1 2