Nov 8, 2016 at 2:23am UTC  
Write a function that performs a snap  for the numbers array
 
Nov 8, 2016 at 2:24am UTC  
void  swap(int  &i, int  &j) { int  t = i; i = j; j = t; }; 
 
Nov 8, 2016 at 2:29am UTC  
why t instead of k ?? So, thats all I need for this function because I dont understand programming at all plus my teacher does not explain very well
 
Nov 8, 2016 at 2:35am UTC  
So, I was on the right track ???
 
Nov 8, 2016 at 2:37am UTC  
Not the right track at all.
1void  swap( int  i, int )int  k;
int  l;
i=j
j-k
};
Your code does not even compile.
Last edited on Nov 8, 2016 at 2:37am UTC  
 
Nov 8, 2016 at 2:38am UTC  
thats what my teacher gave us and said it should work ! 
 
Nov 8, 2016 at 2:39am UTC  
Then how about this?
1void  swap( int  i, int ) {
int  k;
int  l;
i=j
j-k 
};
You are missing some semi-colons (;) at the end of the statements.
Last edited on Nov 8, 2016 at 2:40am UTC  
 
Nov 8, 2016 at 2:42am UTC  
So this void swap is a array correct ??
 
Nov 8, 2016 at 2:45am UTC  
Ugh, I dont know what I am doing. So, what is this then . 
 
Nov 8, 2016 at 2:46am UTC  
What do you want to do with your swap function?
 
Nov 8, 2016 at 2:48am UTC  
Perform a snap for the numbers array
 
Nov 8, 2016 at 2:51am UTC  
Thats what my teacher told us to do. He said write a function that performs a snap for the numbers array. Then he gave us that little code and said it should work 
 
Nov 8, 2016 at 2:55am UTC  
What do you mean by snap ?
 
Nov 8, 2016 at 2:58am UTC  
Would it be the same as bubblesort
 
Nov 8, 2016 at 2:59am UTC  
What is the original assignment?
 
Nov 8, 2016 at 3:11am UTC  
Write a function that performs a snap for the numbers array.
 
Nov 8, 2016 at 3:13am UTC  
What is the meaning difference between snap  and swap ?