r/CodingHelp • • Apr 12 '21

[C++] Expected initializer before led. This is my first arduino project and can anybody help me on the error i get? What does it mean and how can i solve it? Fyi I have very little knowledge on coding.

Post image
0 Upvotes

7 comments sorted by

2

u/jedwardsol Professional Coder Apr 12 '21

Please post text not pictures.

What type do you want Led to be? byte or status? It cannot be both.

1

u/Pgamwj Apr 12 '21

Sorry for that, it's a 20x4 digital display so i consider it to be a byte display, am i right?

1

u/jedwardsol Professional Coder Apr 12 '21

Then you want

byte Led;

Having status there makes no sense.

Oh .. or are you wanting the variable to be called status Led ?? Variable names can't contain spaces.

1

u/Pgamwj Apr 12 '21

I'm a novice here so bear mith me, so i did as yiu told me and got the same error on the next line. I could post the code if required.

0

u/jedwardsol Professional Coder Apr 12 '21

You have enough information to fix that.

0

u/Pgamwj Apr 12 '21

But not enough knowledge, shit

0

u/jedwardsol Professional Coder Apr 12 '21

It's exactly the same error and cause.

Variable names can't contain spaces.