Hey guys, i am having a problem passing my array into a function . What i am trying to do is to pass my array called Alphabets[] from my main into a function called Key. THe issue i am having is that i keep getting an error telling me that there is no matching function call. I hope for some help in this area.
main.cpp
#include "KarmaSutra.h"
using namespace std;
int main() {
KarmaSutra a;
int MaxSize = 26 ;
string s = "d";
string Alphabets[26] = { "a" , "b" , "c" , "d" , "e" , "f", "g" , "h" , "i"
, "j" , "k" , "l" , "m" , "n" , "o" , "p" , "q" , "r" , "s" , "t" , "u" , "v" , "w" , "z" , "y" , "z" } ;
a.Key(Alphabets[26]) ;
KarmaSutra.h
class KarmaSutra
{
public :
void Key ( string [26]);
string AlphaArray[26] ;
};
void KarmaSutra::Key( string d[])
{
// d[] = AlphaArray[ ] ;
for (int i = 0 ; i <26 ; i ++)
{
cout << d[i] << endl;
}
}