Technote/Data Structure C++ [Data Structure] HomeWork 1 : pointer Pooh0216 2009. 9. 16. 17:25 #include using namespace std; void f(int x,int& y) { int w= 16; x+=y; y =w+x; } int main() { int x = 10,y = 11,w = 12; f(x,y); x=10;y = 11;w = 12; f(y,x); x = 10;y=11;w=12; f(w,w); } #include using namespace std; bool sameArray(int A[],int sizeA,int B[],int sizeB) { int i; if(sizeA != sizeB)return false; for (i =0 ; i< sizeA;i++){ if(A[i] != B[i]) return false; } return true; } int main() { return 0; } 저작자표시 (새창열림)