Trying to get the Array out of this function

Joined
Dec 19, 2010
Messages
1
Reaction score
0
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;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,810
Latest member
Kassie0918

Latest Threads

Top