Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+3
Strength to Decrease Rep
-0
60% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
~11.6K People Reached
Favorite Forums
Favorite Tags
c++ x 19
Member Avatar for Suraine

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 …

Member Avatar for WaltP
0
10K
Member Avatar for Suraine

: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 …

Member Avatar for Suraine
0
249
Member Avatar for Suraine

: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 …

Member Avatar for Suraine
0
101
Member Avatar for Suraine

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 …

Member Avatar for vmanes
0
82
Member Avatar for Suraine

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() …

Member Avatar for Ancient Dragon
0
996
Member Avatar for Suraine

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 …

Member Avatar for Suraine
0
102
Member Avatar for Suraine

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()" …

Member Avatar for Suraine
0
115
Member Avatar for Suraine

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) …

Member Avatar for Suraine
0
129