Ok, I have a problem getting an array or string to print. Using cout gives me the memory address of the beginning of the string or array.
I want a command that outputs the array as a whole i.e. 53218 not 0x86fdd0. Hopefully not using a loop.Code:#include <iostream> #include <string> using namespace std; int main(void){ int iArray[5] = {5,3,2,1,8}; cout<< iArray; return 0; }
I appologize for the lack of clarity in my previous post.