why won't atof work here?

Discussion in 'C Programming' started by perien, Jun 12, 2010.

  1. perien

    perien

    Joined:
    Jun 12, 2010
    Messages:
    1
    I'm fairly new (my second day) to c++ so if this is a dumb question, I apologize in advance:


    I have a vector enVec defined as follows

    Code:
    vector<string> enVec;
    Code:
    cout << enVec[1];
    gives the following

    -4.07359333e+00

    so why doesn't something like this work?

    Code:
    atof(enVec[1])
    I get the error:

    perien, Jun 12, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marina

    Re: WHY, WHY WON'T IT WORK???

    Marina, Jun 29, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    342
    Marina
    Jun 29, 2004
  2. Chad
    Replies:
    4
    Views:
    8,308
  3. Drew

    Why doesn't atof work?

    Drew, Jan 20, 2004, in forum: C++
    Replies:
    10
    Views:
    4,724
    Jeff Schwab
    Jan 23, 2004
  4. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,747
    Smokey Grindel
    Dec 2, 2006
  5. LC
    Replies:
    9
    Views:
    578
    Mike Treseler
    Nov 12, 2009
Loading...

Share This Page