- Strength to Increase Rep
- +3
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Hi, everyone: I want to create an infinite array, where normally we initialize an array like this: [code]int array[10];[/code] There is 10 spaces in the computer reserved for array[]. However if I wish to have an array with no limit space, but the number of spaces of an array is … | |
:confused: Arrgh!!! Cant understand these sentence from this website of brickos programming: [URL="http://legos.sourceforge.net/HOWTO/x600.html"]http://legos.sourceforge.net/HOWTO/x600.html[/URL] [code]random() and srandom(int x) are now available in legOS. To use them, just call srandom(int x) at some point during your program startup. x is a "seed", which allows you to get the same sequence of numbers … | |
:idea: :-/ Dear c++ gurus, I have an intention to run two loop together at a time. I dun know whether it is possible or not. My architecture is: [code]run: 1. loop1 2. loop2[/code] [code]loop1 running together with loop2.[/code] [code]loop2 will stop running once loop1 give a signal, say if … | |
i figure out that srand() and rand() are not quite good in creating a random number. for: [code]while(true){ int x = 0; srand((unsigned)x); int r = random(); cout<<r<<endl; }[/code] It gives back the same number. Am I doing something wrong? If not, is there anywhere that we can create our … | |
Dear c++ gurus, I'm new in creating a header file. never try before. ERm... i have write a header file with a program: [code] Header file: MySensor.H extern short int DetectSensor(int sensorvalue[10]) { ....; } [/code] [code] Program file: MyFile.C #include <MySensor.H> short int i; int p, sensorvalue[10]; int getsensorvalue() … | |
Dear c++ guru, I am using cygwin to create a c++ environment for my Lego RCX. I have create a program file in c++ format. when compile with cygwin, it shows: [code] file.ds1: line to short on line 324[/code] can anyone help explain to me what is it? I am … | |
Dear c++ guru: In c++, normally we will call a function as shown below: [code] int funct () { ...; } void main() { funct(); } [/code] main will call the function "funct()" which is defined within the same file. However, in my case, i wish to have the "funct()" … | |
Dear c++ gurus, i have thk all over wat is means by the following hightlighted text, but not understood, can anyone explain to me what do they mean? or how do they function? [code=cpp] class RotationSensor : public Sensor { public: RotationSensor(const Port port, int position = 0) : Sensor((Sensor::Port) … |