What does the error "ISO c++ forbids declaration of InPin with no type", where InPin is a int variable, mean?
Read this before posting a programming question
Post your code please. An error message without code is like a fish without a bicycle.
Mathmang:
What does the error "ISO c++ forbids declaration of InPin with no type", where InPin is a int variable, mean?
It means that InPin has been declared with no type, and ISO c++ forbids that.
Presumably you didn't mean to declare it with no type. Perhaps if you posted your code somebody would be able to spot how you ended up doing that.
I can reproduce your problem by making up my own code:
class foo
{
ant * bar;
};
void setup () { }
void loop () { }
Gives:
sketch_jun08a:3: error: ISO C++ forbids declaration of 'ant' with no type
sketch_jun08a:3: error: expected ';' before '*' token
Now for help with your code, you need to post it.
I think that analogy needs a little work.
Lefty
retrolefty:
[quote author=Nick Gammon link=topic=170696.msg1269247#msg1269247 date=1370562906]
Read this before posting a programming questionPost your code please. An error message without code is like a fish without a bicycle.
I think that analogy needs a little work.
Lefty
[/quote]
I think you mean it's like a broken pencil.
retrolefty:
[quote author=Nick Gammon link=topic=170696.msg1269247#msg1269247 date=1370562906]
Read this before posting a programming questionPost your code please. An error message without code is like a fish without a bicycle.
I think that analogy needs a little work.
Lefty
[/quote]
I thought Nick's analogy was fine. A little overstatement does no harm. Besides, you do want error codes with your code, as much as a fish needs a bicycle.
Msquare:
retrolefty:
[quote author=Nick Gammon link=topic=170696.msg1269247#msg1269247 date=1370562906]
Read this before posting a programming questionPost your code please. An error message without code is like a fish without a bicycle.
I think that analogy needs a little work.
Lefty
I thought Nick's analogy was fine. A little overstatement does no harm. Besides, you do want error codes with your code, as much as a fish needs a bicycle.
[/quote]
No, it's not an overstatement, just a poor analogy. A fish with or without a bicycle is not like posting an error message without the code that caused the error. Perhaps something like:
Posting an error message without the code is like a trying to use a map to get somewhere when you have no idea where you are to start with.
Lefty
Mathmang:
What does the error "ISO c++ forbids declaration of InPin with no type", where InPin is a int variable, mean?
C++ is a typed language. Every identifier must have a data type. You must have an identifier in your code with no type.
retrolefty:
No, it's not an overstatement, just a poor analogy.
It was a jesting reference to assorted things. Try Googling "fish without a bicycle".
There's even a movie of that name.
We'll be up to page 2 at this rate, and still have no idea what the fish code looks like.
Yes, one might say the OP has us all by hook, line, and sinker.
Lefty
retrolefty:
[quote author=Nick Gammon link=topic=170696.msg1271391#msg1271391 date=1370737309]
retrolefty:
No, it's not an overstatement, just a poor analogy.It was a jesting reference to assorted things. Try Googling "fish without a bicycle".
There's even a movie of that name.
We'll be up to page 2 at this rate, and still have no idea what the
fishcode looks like.
Yes, one might say the OP has us all by hook, line, and sinker.
Lefty
[/quote]
Except you can only be "got" by the hook - the line and sinker are just all about getting the hook there in the first place and are ancillary to the operation.
retrolefty:
Yes, one might say the OP has us all by hook, line, and sinker.
It was a funny line though.
I'm just waiting for Lefty to work a bicycle into it.
I got nothing.
Maybe he's just been riding us.