4 registered members (ozgur, Ayumi, VHX, monarch),
1,161
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
A Big Mess with "pan_setdigits"
#412432
11/27/12 12:49
11/27/12 12:49
|
Joined: Nov 2011
Posts: 139 India
Yashas
OP
Member
|
OP
Member
Joined: Nov 2011
Posts: 139
India
|
When I supply a non-pointer variable to pan_setdigits ,it does not work. So does pan_setdigits last parameter requires a pointer only??
If so, I need a solution for tis!!
I have a struct UserProfile (Many might kno ,I had posted tis several times). All of the elements in the stuct are non-pointers.
How do I make it work under pan_setdigits??
Last edited by Yashas; 11/27/12 12:53.
|
|
|
Re: A Big Mess with "pan_setdigits"
[Re: Yashas]
#412433
11/27/12 12:53
11/27/12 12:53
|
Joined: Oct 2011
Posts: 1,082 Germany
Ch40zzC0d3r
Serious User
|
Serious User
Joined: Oct 2011
Posts: 1,082
Germany
|
pan_setdigits(PANEL*, var num, var x, var y, STRING* format, FONT* font, var factor, var* pv)
Did you realize the var *pv? It only takes a POINTER.
Last edited by Ch40zzC0d3r; 11/27/12 12:54.
|
|
|
Re: A Big Mess with "pan_setdigits"
[Re: Ch40zzC0d3r]
#412439
11/27/12 14:10
11/27/12 14:10
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
Lite-C usually references variables if required. If it doesn't work, just the reference operator &.
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: A Big Mess with "pan_setdigits"
[Re: Yashas]
#412464
11/27/12 16:47
11/27/12 16:47
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
It does not matter if they are pointers or not in the first place. The & operator will return the variables address.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: A Big Mess with "pan_setdigits"
[Re: Yashas]
#412598
11/29/12 18:08
11/29/12 18:08
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
You have to to pay attention to operator precedence!
&(ActiveProfile.VARIABLE)
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: A Big Mess with "pan_setdigits"
[Re: Yashas]
#412649
11/30/12 13:36
11/30/12 13:36
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
the parameters you're giving are wrong:
digits(x, y, format, font, factor, var); pan_setdigits(PANEL*, var num, var x, var y, STRING* format, FONT* font, var factor, var* pv);
POTATO-MAN saves the day! - Random
|
|
|
|