Search:

Type: Posts; User: Vanillla

Search: Search took 0.00 seconds.

  1. Replies
    17
    Views
    2,367

    When I do, I get the following error: Invalid...

    When I do, I get the following error: Invalid operends to binary expression ('if stream' (aka 'basic_ifstream<char>') and 'int')
    savefile << player.health
  2. Replies
    17
    Views
    2,367

    The executable, data.txt, and the main.cpp, are...

    The executable, data.txt, and the main.cpp, are all in the same file, but the data.txt file is still being created in Macintosh HD\Users\MyUser
    I only put 's' in front of all the variables is...
  3. Replies
    17
    Views
    2,367

    So, it is saving to a file, but not the file...

    So, it is saving to a file, but not the file where the main.cpp is, so would that mean I would have to add the directory to the file?
  4. Replies
    17
    Views
    2,367

    With the struct is it possible for me to input...

    With the struct is it possible for me to input variables from my main.cpp?
  5. Replies
    17
    Views
    2,367

    It is not adding anything at all, so when I open...

    It is not adding anything at all, so when I open the document data.txt, it is blank
  6. Replies
    17
    Views
    2,367

    Whoops, sorry about that, did the wrong code, the...

    Whoops, sorry about that, did the wrong code, the above one does work, I think I might have too many variables but I am not sure

    void gamesave(string sslimychestplate, string sslimyhelmet, string...
  7. Replies
    17
    Views
    2,367

    I did put it in those tags. It must not show up....

    I did put it in those tags. It must not show up.
    Anyways, the strings are numbers ex: "1", "109", which get the data from integers. So I convert the int value into a string, so it always has a value...
  8. Replies
    17
    Views
    2,367

    C++ Code not adding text to text file

    I have a code but the problem is that it isn't putting the desired text to a text file. I have to have it in a function, can't have it in main. I do include stream, upstream, string, etc.


    void...
Results 1 to 8 of 8