Hi, I am working on this code:
#include <iostream>
using namespace std;
send(to, from, count)
{
register int *to, *from;
register int count;
{
register n=(count+7)/8;
switch(count%8){
case 0: do{ *to++ = *from++;
case 7: *to++ = *from++;
case 6: *to++ = *from++;
case 5: *to++ = *from++;
case 4: *to++ = *from++;
case 3: *to++ = *from++;
case 2: *to++ = *from++;
case 1: *to++ = *from++;
}while(--n>0);
}
}
}
int main()
{
int i;
int a[5]={1,2,3,4,5};
int b[]={0,0,0,0,0};
/*output each a[i] and b[i] in decimal separated by a Tab on one line*/
for(i=0; i<5; i++)
printf("%d\t%d\n", a[i], b[i]);
printf("----------------\n");
send(b, a, 5);
for(i=0; i<5; i++)
printf("%d\t%d\n", a[i], b[i]);
}
and am getting the following error:
expected constructor, destructor, or type conversion before '(' token
I've tried using different types but it only gives me more errors. Can anyone help me fix this?