Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - Array Problems

Array Problems

Discuss OrbForms Designer and PocketC Architect

Postby fabian1131 on Mon Aug 08, 2005 5:12 am

Hi there!

I'v got a question bout arrays:
Why does that not work, OR how do i make that working:

handler mainForm.onopen() {
int iLen=strlen(fldRate.text);
char c[iLen];
}

it gives me an compilor error.

thank you

fabian

++ Vielen Dank dass Sie meinen Post lesen++
++ Thank you for reading my post ++
++ Merci beaucoup pour lire ma poste ++
++ Grazie per lettura del mio messaggio ++
++ Vielen Dank dass Sie meinen Post lesen++
++ Thank you for reading my post ++
++ Merci beaucoup pour lire ma poste ++
++ Grazie per lettura del mio messaggio ++
fabian1131
 
Posts: 91
Joined: Mon Jun 14, 2004 4:45 pm
Location: South Africa

Postby Kasei on Mon Aug 08, 2005 6:13 am

Well, I think, that: char c[needs here a constant for example 9 or 99];
that is my opinion
Kasei
Kasei
 
Posts: 17
Joined: Thu Feb 12, 2004 2:34 pm
Location: Czech Republic

Postby fabian1131 on Mon Aug 08, 2005 7:35 am

thanx for the reply. but i think there has to be a way to define an array with as many constants as you like? dont u think so?
maybe dewey can help us?

fabian

++ Vielen Dank dass Sie meinen Post lesen++
++ Thank you for reading my post ++
++ Merci beaucoup pour lire ma poste ++
++ Grazie per lettura del mio messaggio ++
++ Vielen Dank dass Sie meinen Post lesen++
++ Thank you for reading my post ++
++ Merci beaucoup pour lire ma poste ++
++ Grazie per lettura del mio messaggio ++
fabian1131
 
Posts: 91
Joined: Mon Jun 14, 2004 4:45 pm
Location: South Africa

Postby Kasei on Mon Aug 08, 2005 11:09 am

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by Gazza</i>
<br />Problem here, you assigning a String to an INT.

int iLen=strlen(fldRate.text);

You could do this:

int iLen=(int)strlen(fldRate.text);
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
I don't think: strlen returns INT - Calculates the number of characters in a string.

to fabian1131:
And what about dynamic array - I think that somewhere in forum was topic about it. Isn't dynamic array resolution for your app?
Kasei
 
Posts: 17
Joined: Thu Feb 12, 2004 2:34 pm
Location: Czech Republic

Postby Amauri on Mon Aug 08, 2005 11:27 am

Hi Fabian,

You can try something like this :

char* pcMyDinArray = null;
int iLenMyDinArray;

iLenMyDinArray = strlen(fldRate.text);
pcMyDinArray = new char[iLenMyDinArray];

...

// In the onclose, to release that memory :
if (pcMyDinArray != null) delete pcMyDinArray;

Regards,

Amauri
Amauri
 
Posts: 8
Joined: Wed May 26, 2004 12:48 pm
Location: Brazil

Postby mlambrigger on Mon Aug 08, 2005 2:26 pm

Right and nice Amauri!!

That's the way to deal with dynamics array.

Marc Lambrigger
Marc Lambrigger
mlambrigger
 
Posts: 113
Joined: Fri Feb 13, 2004 11:07 am
Location: Switzerland


Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 1 guest

cron