Hello everyone, I'm brand new to this forum and I need your help already!
When I run my program, I get these errors:
33 C:\Dev-Cpp\Lab 7.cpp expected constructor, destructor, or type conversion before '(' token
33 C:\Dev-Cpp\Lab 7.cpp expected `,' or `;' before '(' token
Here is my code:
#include <iostream>
using namespace std;
const int MAX = 10;
template <typename T>
bool Exists(T data, T array[MAX]);
int main()
{
int iArray[MAX]= {1,3,5,7,11,13,17,19,21,23} ;
char chArray[MAX]={'b','d','e','z','m','c','a','p','s','u'};
//you will have to change the quotes from Mircosofts smart quotes
You forgot to use template <typename T> before the Exists() function, and it's return value also (bool).
Last you have to include the string header #include <string>