Search:

Type: Posts; User: mikeman

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,173

    Input file handling

    I'm trying to figure out how to handle the format of this file to be used with Dijkstra - type algorithm.

    It is a simple text file, with an unknown number of lines (easily created function to...
  2. Thread: Recursion

    by mikeman
    Replies
    4
    Views
    1,625

    I tried last night, and it seems to me that...

    I tried last night, and it seems to me that you're alluding to using a pointer of sorts, so that I'm incrementing what is at a memory location? I haven't been able to properly implement it though.
  3. Thread: Recursion

    by mikeman
    Replies
    4
    Views
    1,625

    Recursion

    I'm trying to get my binary tree to print out 10 things per line. I'm having issues though, as when the traversing reaches a leaf, on moving to the next printable node my counter is reset to one...
  4. Replies
    6
    Views
    1,446

    I suppose so, yes ;) I was just thinking that...

    I suppose so, yes ;) I was just thinking that there was an internal way of doing it that didn't require writing a separate function. Or perhaps I was just looking for confirmation that I had to do...
  5. Replies
    6
    Views
    1,446

    I ended up just doing a workaround and using a...

    I ended up just doing a workaround and using a loop to convert the strings to their ascii sums and comparing them that way.
  6. Replies
    6
    Views
    1,446

    I don't think that you are right in the use of

    I don't think that you are right in the use of < or >, at least not in the sense I'm asking about.

    It will, from what I can tell, compare character by character. Once an inequality is found, it...
  7. Replies
    6
    Views
    1,446

    String Comparison

    I'm attempting to compare two strings for use in insertion for a binary tree. I want to compare the strings similar to how integers are compared, I want the whole string compared, not character by...
  8. Thread: File I/O

    by mikeman
    Replies
    11
    Views
    1,469

    . ..

    .
    ..
  9. Thread: File I/O

    by mikeman
    Replies
    11
    Views
    1,469

    Nevermind, the error is happening elsewhere. ...

    Nevermind, the error is happening elsewhere.

    Thanks for the help!
  10. Thread: File I/O

    by mikeman
    Replies
    11
    Views
    1,469

    Ok, in the file, % precedes a command, say...

    Ok, in the file, % precedes a command, say insert, end, print, etc, to be done on a linked list.

    Here is what I did, but it's not working. Builds fine, but has error that doesn't allow it to run...
  11. Thread: File I/O

    by mikeman
    Replies
    11
    Views
    1,469

    I'm not following too well. I get the first...

    I'm not following too well.

    I get the first part to use getline.

    getline(infile, temp)

    But I'm not too sure what you're meaning from here.
  12. Thread: File I/O

    by mikeman
    Replies
    11
    Views
    1,469

    The name field should not contain whitespace. ...

    The name field should not contain whitespace. The whitespace should be a delimiting character. Which I've sort of tried to implement using get, but haven't been very successful.

    As far as the...
  13. Thread: File I/O

    by mikeman
    Replies
    11
    Views
    1,469

    How can I implement this using C++ syntax,...

    How can I implement this using C++ syntax, instead of C?
  14. Thread: File I/O

    by mikeman
    Replies
    11
    Views
    1,469

    Yes, it is a text file. Specifically, it has a...

    Yes, it is a text file.

    Specifically, it has a Name, then an ID.

    John 123
    James 456
    Joel 135
  15. Thread: File I/O

    by mikeman
    Replies
    11
    Views
    1,469

    File I/O

    I'm trying to read in a file which is formatted like so:

    Char_Array Int
    Char_Array Int
    .
    .
    .

    There is a single space in between the array and the int. How can I read in from this, and...
  16. Replies
    3
    Views
    1,411

    Hah duh, thanks.

    Hah duh, thanks.
  17. Replies
    3
    Views
    1,411

    LL Search Function

    I'm writing a simple LL search function, which will search through the linked list for a Name. If found, it will print out the Name and ID associated with the name, and continue searching.

    I...
  18. Replies
    3
    Views
    1,747

    Would I be able to use strcpy to convert Next to...

    Would I be able to use strcpy to convert Next to char array like this?


    string Next;
    char Next2[size];
    ifstream infile("A2.txt");

    while (infile.good()) {
    getline(infile,Next);...
  19. Replies
    3
    Views
    1,747

    Right. So I thought about using char Next[size]...

    Right. So I thought about using char Next[size] and in the infix to postfix function setting the input as char infix[size] so it would hold the length that I need. But I run into an error with using...
  20. Replies
    3
    Views
    1,747

    Help altering code to work with char array

    I'm writing code for an assignment for infix to postfix conversion using stack class and queue class. My conversion function I think needs to accept a character array, but I have set up in main to...
  21. Replies
    3
    Views
    2,435

    Got started on breaking it down but have to break...

    Got started on breaking it down but have to break till later, have a class to go to.

    One issue I'm seeing and I think is due to type issues:
    I load a char array with "ABCD" and load the first...
  22. Replies
    3
    Views
    2,435

    Never ending loop

    I'm writing an infix to postfix program. All has been slowly but surely going well, but now I'm actually running the program after getting rid of all warning and errors the compiler found, and...
  23. Replies
    1
    Views
    1,925

    Edit stack code to make queue

    edit: delete this post. Figured out problem.
  24. Thread: STL code

    by mikeman
    Replies
    3
    Views
    1,248

    STL code

    I'm trying to find code that is used in the STL.

    I have an assignment where we are to use stacks / queues, but he wants us to build the stack using a class and write our own functions for...
  25. Replies
    3
    Views
    2,124

    I figured it out. Thank you all for all of the...

    I figured it out.

    Thank you all for all of the help you've given!
Results 1 to 25 of 54
Page 1 of 3 1 2 3