Hi, I'm writing a program that allows me to read a text.
Now it doesn't do any of this because I'm stuck at "getline" an error ([Error] no matching function for call to 'getline (std :: string &, std :: string &)') I've tried with all the tutorials but don't want any know dev to accept getline, how do i do it?
it still not working, is saying to me ([error] variable ‘std::ifstream in’ has initializer but incomplete type) i researched for this but i dont understand what mean
1 2 3 4 5 6 7 8 9 10 11 12
#include <iostream>
#include <string>
int main(){
std::string take_code;
std::cin>>take_code;
std::ifstream in (take_code);
std::string code;
getline(in,code);
std::cout<<code;
return 0;
}
meanwhile i found a method to reduce or simplify the code but i dont know if this will change the resolution of this problem