|
Thanks to 'enhzflep' for the reply,
I also want to know that, how can I hook system function to avoid returning of system dll by supplying my custom dll handle ?
From,
themilan.
|
|
|
|
|
Hello
I have a code where 2 double data types are added,
double = double1 + double2;
I am purposefuly not declaring a variable of type double and writing
what the issue am facing is,
sometime the double2 becomes negative. but i want to ignore the negative and just ad the 2 numbers.
so can i do like,
double = double +- double2;
Let me know.
|
|
|
|
|
I believe what you are looking for is abs , that will give you the "absolute value" of whatever you feed it, so if your value is 123, it will give you 123, if it is -321, it will give you 321. Is that what you want?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
modified on Friday, September 18, 2009 8:47 AM
|
|
|
|
|
Ya i want to avoid the negative that sometimes comes up with double2.
so how to do that programmatically?
can you show a sample code?
so does that mean, there is a better way to do that, rather than doing,
double = double1 +- double2; ?????
|
|
|
|
|
This:
dipuks wrote: double = double1 +- double2;
translates into this:
double = double1 + (-1 * double2);
Thus, it will turn your negative double2 to positive BUT it will also turn positive double2 to negative which is i supose not what you want.
But this:
double = double1 + abs(double2);
will ALWAYS work with a "positive double2 ".
You could also do this:
double = double1 + ((double2 > 0)?double2:-double2)
or
if (double2 > 0) double = double1 + double2;<br />
else double = double1 + -double2;
or
if (double2 > 0) double = double1 + double2;<br />
else double = double1 - double2;
Or i don't understand what you want to do.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
|
dipuks wrote: so how to do that programmatically?
can you show a sample code?
Isn't that what the reference to abs() was for?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hai all ,
I am using NetuseAdd() function for that I have to link to netapi32.lib ,
but i am unable to download it ,
please can any one help me?
ranjith
|
|
|
|
|
Why do you want to download it independantly ? It should be part of the platform SDK. Did you download the PlatformSDK ? Which version of Visual studio are you using ?
|
|
|
|
|
I am using vs 6.0(vc++)
Thanks
Ranjith
|
|
|
|
|
Which version of Windows are you targeting? This API is present only in Windows 2000 or above. You must ensure to define _WIN32_WINNT and WINVER to something that's above 0x500 (Windows 2000 or above) to have this API available to be used from your code.
Are you using a really OLD SDK?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Download the platform SDK from the microsoft site and integrate it to visual studio.
if you are using VS 6, you have to download platform SDK 2003[^]
If you are using any latest version of visual studio, better download the latest SDK[^]
|
|
|
|
|
Naveen wrote: If you are using any latest version of visual studio, better download the latest SDK[^]
Actually, the latest sdk is here[^]
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
ha...Thanks
I actually checked for a latest SDK than SDK 2008 by googling "SDK 2009". which didnt give me a valid result. Now only I came to know that, they changed the convension of post fixing the year with the SDK name .
|
|
|
|
|
I am using windows XP(vs 6) as a client and windows server2003 as a server.
I have to access the shared folder from server to client without authentication(I have to authenticate thgough the program).
Thanks
ranjith
|
|
|
|
|
|
Did you not believe me the first time I said it here/
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
Did you investigate after my previous reply [^] ?
Why don't you provide more information if what I suggested is not what you are looking for ?
|
|
|
|
|
Sorry Mr. Cedric
~~~~~~~~~~~~~Raju~~~~~~~~~~~~~
|
|
|
|
|
Is there any samples for implement OCR Concept ..??
Thanks!!!!!11
~~~~~~~~~~~~~Raju~~~~~~~~~~~~~
|
|
|
|
|
rajugis, this is at least the 10th thread i've seen you make in the past week where you've asked for some obscure function or technique, having shown absolutely no attempt at solving the problem yourself. If you don't try and find a solution on your own, then nobody else will bother helping you to find one.
|
|
|
|
|
Hi,
Some where I read that when we don't have the efficient size for a data type we can increase this one by using operator overloading.
For example he is saying that a integer is having 2 bytes of memory occupancy by using operator overloading he says that he can increase this memory into 4 byte. Is it really possible like in this approach.
Any one please show me the correct path for this.
sampath-padamatinti
|
|
|
|
|
By operator overloading?! No. Maybe a pragma pack.
And what do you mean by 'an efficient size for a data type', pray tell?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
sampath-padamatinti wrote: don't have the efficient size for a data type
What does this mean?
That the size is inefficient? In what way; not 32-bit aligned?
What kind of data type are you referring to? Classes?
sampath-padamatinti wrote: we can increase this one by using operator overloading
Well, it depends...
The code size will of course be bigger, but the size of the object will remain.
You may increase the size of an object by adding one or more virtual functions as the virtual table is part of the object, but this has nothing to do with efficiency.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|