-1

So I have this code:

private void update();
{

}

In visual studio, it shows up like this:

enter image description here

The errors are:

Type or namespace definition, or end-of-file expected Invalid token '{' in class, struct, or interface member declaration

Why does it do this? It's not in another void or anything.

4

1 回答 1

10

remove the ; after private void.

private void update()
{

}
于 2012-09-23T22:17:14.237 回答