Skip to main content
Became Hot Network Question
edited tags
Link
Michel Keijzers
  • 13k
  • 7
  • 40
  • 58
Source Link
2012User
  • 149
  • 1
  • 8

'Var' does not name a type!

I don't have much experience in C++ programming. I'm getting this error

'z' does not name a type!!!

which I have't seen in MATLAB or python... What's wrong??? It is so simple!!!

float x=10; float y=50; float z;
z=x*y;

void setup() {
  // put your setup code here, to run once:
}

void loop() {
  // put your main code here, to run repeatedly:
}