Unable to store my entire string in an array trough a pointer. (C++)
I have recently started to learn C++ trough the tutorials on cprogramming.com and so far i find it really fun!
However, I am having some problems creating strings(stored in arrays) trough pointers.
Here is my code:
Now when i write a sentence, for example "Hello World" it will only print out the first character ("H").
arry = new char;
cout<<"Please enter a string.\n";
cout<<"\nYour string has been saved, press enter to read it.\n";
delete  arry;
If i just declare an array and put the string in that array it will work just fine, so I am guessing that I am doing something wrong with the pointer.
Any help would be greatly appreciated!