I know that I have to get the memory location for the Array, and get the array by reference.. but I can't seem to get it out.
//function prototypes
int *ChartoAscii();
int _tmain(int argc, _TCHAR* argv[])
{
int Ascii;
Ascii= *ChartoAscii();
}
int *ChartoAscii()//Change input to ascii values
{
string Inputlen;
int TempNumOne;
char Filename[100];
int Asciichar[100];
cout<<"enter a string"<<endl;
getline(cin, Inputlen);
TempNumOne=Inputlen.length();
for (int a=0;a<=TempNumOne;a++)
{
Filename[a]=Inputlen[a];
cout<<Filename[a]<<endl;
}
cout<<"as ascii characters"<<endl;
for (int b=0; b<=TempNumOne;b++)
{
Asciichar=int(Inputlen);
cout<<Asciichar<<endl;
}
return Asciichar;
}
//function prototypes
int *ChartoAscii();
int _tmain(int argc, _TCHAR* argv[])
{
int Ascii;
Ascii= *ChartoAscii();
}
int *ChartoAscii()//Change input to ascii values
{
string Inputlen;
int TempNumOne;
char Filename[100];
int Asciichar[100];
cout<<"enter a string"<<endl;
getline(cin, Inputlen);
TempNumOne=Inputlen.length();
for (int a=0;a<=TempNumOne;a++)
{
Filename[a]=Inputlen[a];
cout<<Filename[a]<<endl;
}
cout<<"as ascii characters"<<endl;
for (int b=0; b<=TempNumOne;b++)
{
Asciichar=int(Inputlen);
cout<<Asciichar<<endl;
}
return Asciichar;
}