Hey.
Im working on a new Project but i need your help converting a std::string to double!
I dont know why i get the LNK error so i hope someone of you know it :).
Here are the includes...
#include "stdafx.h"
#include <windows.h>
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <string>
ok i think that only stdlib.h and stdio.h is necessary for that function but ok here is the function.
double toDouble(string in){
double out = atof(in.data());
return out;
}
it should work right? but it doesnt :(.
Here is the error... in german :x
Fehler 1 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl calcstring(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?calcstring@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@Z)" in Funktion ""void __cdecl calc3(void)" (?calc3@@YAXXZ)". TaschenRechner.obj
I think i have to include a lib with #pragma comment(lib, "xXx");
but i dont know which :o... MSDN wont help me :'(.
Thanks!
Daniel