Hi! i am sorta new to this forum, but i have a problem with my code/compiler. i dont know if it is the compiler's fault or mine. I am self taught and learning from the book "SAMS teach yourself C++ in 21 days" i am trying to code a program that deletes(well, replaces the file with something else that has nothing in it.) other files. Here is my code...
Heres the errors i am getting and why i think i shouldn't get these errors, i am getting...
cout<<"Type '0' to exit the program"<<endl;
cout<<"Enter filename: ";
cout<<"File not found!"<<endl;
but i know that the getline is being called from the #include <iostream> and also from the code using std::cin;
15 C:\Documents and Settings\Simon\My Documents\Untitled1.cpp no matching function for call to `std::basic_istream<char, std::char_traits<char> >::getline()'
If i replace the code
getline(filename) with cin>>filename;
i have no problems from the compiler about the cin, but then again i get this error...
but i know i declared ifstream when i wrote #include <fstream>
20 C:\Documents and Settings\Simon\My Documents\Untitled1.cpp `ifstream' undeclared (first use this function)
i am using Dev-C++ 220.127.116.11 can someone here tell me if my logic is wrong or if my compiler is really buggy and need to get/download another one?