No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
So im in a collage c++ class, and i missed my last class, so my teacher told me to try lab 5, i think i have templates down but im getting a compiler error saying that my function is ambigious.. the exact error is Error 1 error C2782: 'T searchArray(T,T,int)' … |
|
[CODE]#include <fstream> #include <iostream> #include <cassert> using namespace std; int main() { ifstream inFile; ofstream outFile; inFile.open("file.txt"); assert(!inFile.fail()); cout << "everythings fine" << endl; cin.ignore(); cin.get(); return 0; }[/CODE] This is my current code, file.txt doesnt exist. The program simply crashes. I was hoping for an error message explaining what … |