Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > why won't atof work here?

Reply
Thread Tools

why won't atof work here?

 
 
perien perien is offline
Junior Member
Join Date: Jun 2010
Posts: 1
 
      06-11-2010
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[i] 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:

Quote:
error: no instance of function "atof" matches the argument list
argument types are: (std::string)
atof(enVec[1]);
^
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
locale independent atof? sprotty@hotmail.com C++ 2 01-17-2005 03:37 PM
atof() and _tstof() in VC6.0 Pete C. C++ 9 06-24-2004 09:38 PM
Why doesn't atof work? Drew C++ 10 01-23-2004 01:27 AM
what are the reverse functions of atof( ), atoi( ) and atol( ) ? Sharon C Programming 4 11-17-2003 10:13 AM



Advertisments