I'm trying to use C++ to solve Project Euler problem 4.
I thought of placing each digit into an array and seeing if the values of the elements are the same in the correct places. This is what I have so far:
int digits[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
But I can't write the code. How can I take the number and make it seem that way? I know the basics of C++ (loops and pointers). How to use adjustable array in C++ and should I use this? I also don't know what the size of the array should be. Is there another better algorithm to implement?