Search:

Type: Posts; User: zephyrcat

Search: Search took 0.01 seconds.

  1. OK. Could I just convert between string and char...

    OK. Could I just convert between string and char array before/after writing/reading to the file? If I can, how can I convert a char array to a string?

    Thanks!
  2. I don't need the file to be human readable, but I...

    I don't need the file to be human readable, but I do need the program to be able to read it and display the information there in human readable form. Right now, when I use the readfromfile function...
  3. I changed my program to use that way of doing...

    I changed my program to use that way of doing things. I had no idea that was possible. (Could I just do that with my plant class?)

    Now the name has the correct name followed by a bunch of symbols...
  4. OK. I wrote a read function. Everything works...

    OK. I wrote a read function. Everything works except for the name (the only string.) The name is just blank. I suspect this has to do with what Daved was talking about. Any idea how I can overcome...
  5. tabstop - That makes sense, but then I should be...

    tabstop - That makes sense, but then I should be able to add an & in front of waterd.getd() and it should work. Instead, when I do that I get this error:
    non-lvalue in unary '&'

    Thanks!
  6. Thanks for the help. I got the error I was...

    Thanks for the help. I got the error I was getting fixed.

    Daved - The reason I am using binary rather than text is because, as I understand it, that is required for random access. If that is...
  7. No Matching Function Error When Opening File

    I have a function in a .h file designed to save some information to a file, but I get this error:

    error: no matching function for call to `std::basic_fstream<char, std::char_traits<char>...
  8. Replies
    5
    Views
    1,635

    Thank you! Making the file in advanced solved the...

    Thank you! Making the file in advanced solved the problem. I used notepad and choose encoding Unicode, instead of ASCII.
  9. Replies
    5
    Views
    1,635

    Cannot open binary file

    I am working through the book C++ Without Fear and just got to the part where binary files are introduced. I created a program using binary files, but it can never successfully open the file. I tried...
  10. Replies
    2
    Views
    1,005

    Problem with call by reference

    I have two functions, insertNode and makeTree, both of which are supposed to modify the original tree they are being sent, but only makeTree does. Any changes made to the tree I am using in makeTree...
  11. Replies
    14
    Views
    7,703

    Alright, thanks!

    Alright, thanks!
  12. Replies
    14
    Views
    7,703

    I would like to know how to copy a list so I end...

    I would like to know how to copy a list so I end up with two separate lists that have the same information in them so that I can modify one without modifying the other.

    Thanks!
  13. Replies
    14
    Views
    7,703

    Thank you! My program works now! Just out of...

    Thank you! My program works now!

    Just out of curiosity and in case I have to do something similar again, how could you do the same thing except by creating a copy of the origional list and than...
  14. Replies
    14
    Views
    7,703

    My astonishment matches anon's. Are you trying to...

    My astonishment matches anon's. Are you trying to modify someone else's remove function to do what you want, or what?

    No, I am new to C.

    Sorry I guess I needed to be a lot clearer. I do want to...
  15. Replies
    14
    Views
    7,703

    I don't want Return to modify the original list....

    I don't want Return to modify the original list. I guess instead of saying "return" I should have said "print".

    tabstop - The problem with doing it that way is that it modifies the origional list....
  16. Replies
    14
    Views
    7,703

    Sorry, could you give me sme more specifics, I am...

    Sorry, could you give me sme more specifics, I am new to this. Thanks!
  17. Replies
    14
    Views
    7,703

    Duplicating value of pointer to linked list

    I am trying to extract the head from a linked list (and also the tail, but that part works) with the following function:

    void Remove (myllist *list){ //remove the head and return the removed node...
  18. Replies
    4
    Views
    1,136

    Thank you, I fixed that and now my program works.

    Thank you, I fixed that and now my program works.
  19. Replies
    4
    Views
    1,136

    Cannot make linked lists work

    Hi! I am trying to create a simple program to create a linked list and delete one of the nodes. When I run my program the print out for the "old list" is 4 and the "new list" is nothing. I am not...
Results 1 to 19 of 19