error C2447: missing function header (old-style formal list?)

What to do if i receive this message?? Here is a piece of my coding

void agesort();
{ //THIS IS WHERE THE ERROR OCCURS
for(int j=DATABASE; j>=2; j--);
for(int k=0; k<j-1; k++);
if(records[k].AGE<records[k+1].AGE)
(records, k, k+1);

void swap(struct student * records, int pos1, int pos2);

{
int pos1=45;
int pos2=45;
student temp;
temp=records[pos1];
records[pos1]=records [pos2];
records[pos2]=temp;

}
}

Comments

  • : What to do if i receive this message?? Here is a piece of my coding
    :
    : void agesort()[red]; <--- Here[/red]
    : { //THIS IS WHERE THE ERROR OCCURS
    : for(int j=DATABASE; j>=2; j--);
    : for(int k=0; k<j-1; k++);
    : if(records[k].AGE<records[k+1].AGE)
    : (records, k, k+1);
    :
    : void swap(struct student * records, int pos1, int pos2);
    :
    : {
    : int pos1=45;
    : int pos2=45;
    : student temp;
    : temp=records[pos1];
    : records[pos1]=records [pos2];
    : records[pos2]=temp;
    :
    : }
    : }
    :

    That happens when you define a function, but leave the semi-colon on the function name part, as if you were just declaring it.


    -Tony

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion