Thread: help me with c++

  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    2

    help me with c++

    good day

    if I have name and gread in a file like this :

    telfer 67
    jon 89
    necales 78
    .
    .
    .



    and I want to add name with gread in this file ( name <=10 characters, 0<=grade<=100 )

    haw I can do this ?


    thank you

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    >> haw I can do this ?

    1) Open the file.
    2) Write to the file.
    3) Close the file.
    4) Rinse, lather, repeat.
    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;
    }

  3. #3
    Registered User
    Join Date
    Jun 2009
    Posts
    2
    sebastiani

    I mean how I can add name with gread in the file by using c++ ?

Popular pages Recent additions subscribe to a feed