Search:

Type: Posts; User: 9erNumber16

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,438

    Never mind, fixed it.

    Never mind, fixed it.
  2. Replies
    1
    Views
    1,438

    error: undefined reference

    Not sure what I'm doing wrong. Here is the error message:
    main.cpp:32: undefined reference to `FindPath::FindPath(Graph&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
    ...
  3. Replies
    6
    Views
    1,956

    Ah, I think I understand. Come to think of it, I...

    Ah, I think I understand. Come to think of it, I did have a couple name collisions I had to fix. Thanks again.
  4. Replies
    6
    Views
    1,956

    Ok, got it working. Thanks for the replies. Now...

    Ok, got it working. Thanks for the replies. Now I just have to figure out what to do with my vertices method. Out of curiosity, why is putting "using namespace std" in the header bad practice?
  5. Replies
    6
    Views
    1,956

    I'm using a while loop like this: (while...

    I'm using a while loop like this: (while myFile.good()). I figured I needed another for the rest of the line. Here's what I tried:


    while(myFile.good())
    {
    getline(myFile,line,...
  6. Replies
    6
    Views
    1,956

    Add to map using ifstream (homework)

    We're doing the "How Close to Kevin Bacon" problem in class. To do it, we are building a graph using maps and sets. I'm still new to C++, and am having problems with the very beginning (reading the...
  7. Replies
    15
    Views
    2,659

    Wow... it's so beautiful... In my defense, I did...

    Wow... it's so beautiful... In my defense, I did try something similar to that using a while loop (unsuccessfully, obviously). I think this whole thread is a pretty strong testament that I need to...
  8. Replies
    15
    Views
    2,659

    My pop function does return it, but then the size...

    My pop function does return it, but then the size got smaller with each iteration, so I was only printing half the values. Somebody else mentioned the intStack, and now I see the reason. And wow,...
  9. Replies
    15
    Views
    2,659

    Yeah, I realized that's why I wasn't getting the...

    Yeah, I realized that's why I wasn't getting the right results. Too bad C doesn't have a standard iterator built in...
  10. Replies
    15
    Views
    2,659

    Also, I read the assignment wrong, and I don't...

    Also, I read the assignment wrong, and I don't have to pop in the printStack, so I'm guessing I'll need an iterator.
  11. Replies
    15
    Views
    2,659

    You were right, I needed to initialize it, but I...

    You were right, I needed to initialize it, but I was thinking in C++ and Java terms and it was messing me up. Here's what I have now:


    #include <stdio.h>
    #include <string.h>
    #include...
  12. Replies
    15
    Views
    2,659

    Ok, never mind on that. I'm an idiot, still...

    Ok, never mind on that. I'm an idiot, still adjusting to C syntax. It is still leaving one number out, but I think I might be able to handle that. Thanks.
  13. Replies
    15
    Views
    2,659

    For some reason, whenever I initialize count = 0,...

    For some reason, whenever I initialize count = 0, it says stack has no member 'count.' And I agree about the printStack not popping, but for some reason that is what the assignment calls for. If I...
  14. Replies
    15
    Views
    2,659

    Ok, handled that. But it's still giving count as...

    Ok, handled that. But it's still giving count as a memory location instead of an int.
  15. Replies
    15
    Views
    2,659

    Help implementing a stack

    I'm learning about structs in C, so we were assigned to implement a stack using a singly linked list. Whenever I try to print the stack, it prints the values I input, then says there is an error. I...
Results 1 to 15 of 15