Thread: Save to File

  1. #16
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  2. #17
    Confused
    Join Date
    Nov 2002
    Location
    Warwick, UK
    Posts
    209
    Hey, it works ! Thanks Eibro !

    Why is there no use for a string of unlimited length ? Say I wanted a 1000 letter password ? I'd put [1000] ?

  3. #18
    Registered User
    Join Date
    Nov 2002
    Posts
    36

    Thumbs up Eibro's correction worked with my Compiler

    Eibro's codes compiled and executed fine with my compiler. I'm using Visual Studio 6. Can you write what it does for you, if its not working?
    will be there one day!

    I usually use VStudio 6!

  4. #19
    Confused
    Join Date
    Nov 2002
    Location
    Warwick, UK
    Posts
    209
    This latest code from Eibro worked fine on mine this time...
    Now !

    Can anyone ( if it's not too much to ask, I feel as if I'm asking too much here ) give me an example of a save-game load-game feature in a C++ game ? How do I import the saved options... and later, how do I go on to encrypting the text file so people don't modify stats / money etc. ?

  5. #20
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361

    bit manipulation/shifting

    That's where you need to look up bit shifting, and if anyone knows, can someone post a good example, cuz I've been looking for one too.
    Stan The Man. Beatles fan

    When I was a child,
    I spoke as a child,
    I thought as a child,
    I reasoned as a child.
    When I became a man,
    I put childish ways behind me"
    (the holy bible, Paul, in his first letter to the Cor. 13:11)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Save a file with a name in a variable?
    By guriwashere in forum C Programming
    Replies: 2
    Last Post: 06-01-2009, 04:03 PM
  2. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 07:51 PM
  3. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 08:39 AM
  4. Ask user to save file before exiting.
    By Bajanine in forum Windows Programming
    Replies: 3
    Last Post: 11-15-2004, 06:34 PM
  5. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 07:01 PM