Subject:
|
c++, sensor declaration
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Tue, 10 Apr 2001 08:36:53 GMT
|
Viewed:
|
1619 times
|
| |
| |
Hallo!
I tried to declare sensors global, out of main():
Motor motor(Motor::B);
LightSensor s(LightSensor::S3,false);
int main(){
...
}
make reports an error:
/home/micha/legOS/util/makelx test.ds1 test.ds2 test.lx
test.ds1: address out of bounds on line 311
If I declare the sensors within main(), it works.
Can someone tell me, why I can't declare sensors global? In c++ it
should be possible.
Best regards.
Michael
|
|
1 Message in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|