Expected unqualified id

Do someone know why at line 15 and 23 there’s the error named in the title??

#include<iostream>
using namespace std;
void input(int[], int);
void output(int[], int);
int main()
{
const int dim=10;
int vett[dim];
input (vett, dim);
output (vett, dim);
system("PAUSE");
return 0;
}
void input (int vett[], int dim);
{
for(int i=0; i<dim; i++)
{
std::cout<<"Inserire l'elemento di posto: "<<i+1<<" ";
std::cin>>vett[i];
}
}
void output (int vett[], int dim);
{
for(int i=0; i<dim; i++)
{
std::cout<<vett[i]<<" ";
}
}
Remove the semicolons at the end of line 14 and 22.
Last edited on
Can you show me how to do? Because I don’t understand what semicolons means.
what semicolons means

http://www.wordreference.com/enit/semicolon
https://en.oxforddictionaries.com/definition/semicolon

Please use code tags <> when posting your code:
http://www.cplusplus.com/articles/jEywvCM9/

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <iostream>

void input(int[], int);
void output(int[], int);

int main()
{
    const int dim = 10;
    int vett[dim];
    input (vett, dim);
    output (vett, dim);
    system("PAUSE");
    return 0;
}


void input (int vett[], int dim)
{
    for(int i = 0; i < dim; ++i)
    {
        std::cout << "Inserire l'elemento di posto " << i + 1 << ": ";
        std::cin >> vett[i];
    }
}


void output (int vett[], int dim)
{
    for(int i = 0; i < dim; ++i)
    {
        std::cout << vett[i] << ' ';
    }
    std::cout << '\n';
}

Topic archived. No new replies allowed.