void init (int k); // THERE SHOULD BE NO SEMI-COLON HERE
{st[k]=0;
int successor
(int k);
{if(st[k]<n)
{st[k]=st[k]+1;
return 1;}
I take it this is an attempt to define a function. It's wrong, and the definition of the next function, valid, is stuck in the middle of it. Go back and format your code properly so that you can see where you're mixing all your function together into one big mess.
Also, I've marked above where there should be no semi-colon.
right...well...the problem is that my teacher gave me this program, and, at first it had about 10 errors, which i fixed..but i have no idea what i am supposed to do now...
Start by reformatting it correctly so you can see it clearly. Then you'll be able to fix the errors. You professor is using outdated C++ code from over a decade ago, which isn't going to help. I bet you're using Dev-Cpp as well.
1 2 3 4 5 6 7 8 9 10 11 12
#include<iostream.h>
typedefint stiva[100];
int n,i;
stiva st;
void init (int k);
{
st[k]=0;
int successor (int k);
{
if(st[k]<n)
....
....