Basically I have to create an array, fill it, and then print it on screen. The tricky thing is that need to use pointers to fill it and print and later on sort it. My problem is that with this code is that i get Error 2 error C2109: subscript requires array or pointer type c:\users\pc\desktop\usb\anthony\documents\visual studio 2012\projects\essaie\essaie\essaie.cpp 55 and 5 IntelliSense: expression must have pointer-to-object type c:\Users\pc\Desktop\USB\Anthony\Documents\Visual Studio 2012\Projects\Essaie\Essaie\Essaie.cpp 55 whenever I try to run it.
Given int *Array[AS][AS], what is the type of &Array[k]?
Your swap expects int * const. That type is not even close.
Standard library has template for std::swap. It cannot accept your type.
Edit: Aha! You did edit out your original question and replace it with something else. Not nice.
The code that I see now leads to counter-question(s):
You do *foo[a][b] = 7;. It is again quite clear that the type of foo cannot be int *. What would the type have to be in order for the statement to be legal?
Given int * foo, how do you access a memory location somewhere near foo?
Given int foo[Y][X];, foo is not a pointer to integer(s).
How much do you know about passing arrays to functions? Is that a by-value copy operation?