Click here to Skip to main content
15,918,193 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralAdding to dialogue design palette Pin
Trollslayer12-May-03 5:31
mentorTrollslayer12-May-03 5:31 
GeneralRe: Adding to dialogue design palette Pin
G. Steudtel12-May-03 6:05
G. Steudtel12-May-03 6:05 
QuestionTLB's need to be registered ?? Pin
Braulio Dez12-May-03 5:28
Braulio Dez12-May-03 5:28 
AnswerRe: TLB's need to be registered ?? Pin
Anonymous13-May-03 16:13
Anonymous13-May-03 16:13 
GeneralWinINet Via Proxy Pin
thowra12-May-03 5:09
thowra12-May-03 5:09 
GeneralErrors Pin
flora_k12-May-03 4:50
flora_k12-May-03 4:50 
GeneralRe: Errors Pin
flora_k12-May-03 4:53
flora_k12-May-03 4:53 
GeneralRe: Errors Pin
G. Steudtel12-May-03 5:11
G. Steudtel12-May-03 5:11 
Well, it helps to understand the queer syntax.
First of all, if you want to initialize a variable, use 0(zero) instaed of NULL. NULL should only be used for pointers, meaning not available memory. It may or may not coincide with being zero.

A variable is not a function. in your sample trl_value was used as a function trl_value(length(.....)), this function was then given a value, and never stored. Two errors at once.
A function cannot assigned a value, it is returning one! And a variable cannot be a function.
You may of course have a function with the same name like a variable, but this is bad manners, and not shown in your sample code.
So I think the best is, you just make clear what the code should perform. and write a plain simple text(file) in your local language, and try to translate this one into C.

Rounding in C/C++:
One of many methods
<br />
VariableRounded = (long)(VariableToBeRounded+0.5);<br />

Works mathematically correct only for positive values.
So try to use the floor or ceiling finctions instead. Still issues with signs.

G. Steudtel
GeneralRe: Errors Pin
David Crow12-May-03 5:11
David Crow12-May-03 5:11 
GeneralRe: Errors Pin
Iain Clarke, Warrior Programmer12-May-03 5:13
Iain Clarke, Warrior Programmer12-May-03 5:13 
GeneralSpinControl Help Pin
VanHlebar12-May-03 4:45
VanHlebar12-May-03 4:45 
GeneralRe: SpinControl Help Pin
Iain Clarke, Warrior Programmer12-May-03 5:05
Iain Clarke, Warrior Programmer12-May-03 5:05 
GeneralRe: SpinControl Help Pin
VanHlebar12-May-03 16:25
VanHlebar12-May-03 16:25 
GeneralRe: SpinControl Help Pin
VanHlebar12-May-03 16:26
VanHlebar12-May-03 16:26 
GeneralDynamic loading of buttons Pin
JensB12-May-03 4:33
JensB12-May-03 4:33 
GeneralRe: Dynamic loading of buttons Pin
David Crow12-May-03 4:38
David Crow12-May-03 4:38 
GeneralRe: Dynamic loading of buttons Pin
JensB12-May-03 4:43
JensB12-May-03 4:43 
GeneralRe: Dynamic loading of buttons Pin
David Crow12-May-03 5:06
David Crow12-May-03 5:06 
GeneralRe: Dynamic loading of buttons Pin
basementman12-May-03 5:23
basementman12-May-03 5:23 
GeneralRe: Dynamic loading of buttons Pin
David Crow12-May-03 5:56
David Crow12-May-03 5:56 
GeneralCPropertySheet Pin
RalfPeter12-May-03 4:23
RalfPeter12-May-03 4:23 
GeneralRe: CPropertySheet Pin
JensB12-May-03 4:30
JensB12-May-03 4:30 
GeneralRe: CPropertySheet Pin
David Crow12-May-03 4:36
David Crow12-May-03 4:36 
Generalsimple virtual method design q. Pin
Maximilien12-May-03 4:06
Maximilien12-May-03 4:06 
GeneralRe: simple virtual method design q. Pin
G. Steudtel12-May-03 4:42
G. Steudtel12-May-03 4:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.