|
I have a negative double number, say, -11.0, when I use pow() to find its power of 1/3, I return NAN.
double a = -11;
double power = pow(3, -1);//1/3
double result = pow(a, power);
the result is not equal to (-11)^(1/3), but is NAN
However, when I change the power = 3, the result is normal.
Is that pow() cannot find a x^y for x<0 and y<1?
thanks
|
|
|
|
|
I guess that pow does not find roots of -ve numbers since all even roots are imaginary.
If you are always getting the cube root for your negative numbers.
You can do the following:
1) Make the number positive.
2) Get the cube root of the positive number.
3) Make the answer negative (multiply by -1).
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Hello all...
I've been developping an application to render Videoclips or still images to fullscreen, with the ability to fade smoothly between clips.
I was facing a great CPU consumption (>50%) using DirectShow Filters and VMR9. Furthermore it was quite hard to make the system stable since the filtergraph is modified each time a video clip of a different format is added.
Now I was checking out the Video for Windows (VfW) capability of the Platform SDK. I wonder if it would be worth a look at. An advantage of DirectShow surely is the independence of formats, as much as I know VfW works mostly with AVI.
Does anybody have some experience with VfW?
How about the other formats like MOV or MPG?
Regards
|
|
|
|
|
DirectShow supersedes Video For Windows, with a very few exceptions - a very small number of the AVI functions from memory. If you need help on issues this specific to DirectShow it may be better to contact a more specific forum. I've found DirectXAV to be very helpful in the past.
Microsoft have also announced that DirectShow support will be deprecated in the near future and a new improved multi-media API will be made available. From what I can remember it's on a similar timescale to avalon, I'm not sure what will happen to VfW support when this happens.
|
|
|
|
|
Hi.
Does anybody know an open source resource editor/compiler,
desirable - compatible with VC++ 6.0?
Thanks.
|
|
|
|
|
|
|
how do you read an argument passed to a dialog application?
For example, i have compiled a dialog application in c drive named "test.exe"
how do i modify the code so that it can read the argument passed into it?
for example if i type in command prompt:
c:\>test mod
the application should read the argument 'mod' passed into it
how can i do that?
|
|
|
|
|
hi
In your App Class Add following into InitInstance()
// Get Command line arg.
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
then look for members of CCommandLineInfo .
or
u can also use
::GetCommandLine();
look more about this in MSDN
Jetli
Constant Thing In World Is Change.
|
|
|
|
|
|
|
In addition to Jetli's suggestion, you always have access to __argc and __argv .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I’m working in images transportation methods; the images I’m working on are facial photos. It has white background. It’s capacity 80KB for BMP and 11KB for JPG.
My problem that I can move these types of images by 1KB size only. So I used “Lead tools” (www.leadtools.com) as compression tool which compressed it till my 1KB exactly by J2K extension. However, I lost some of the quality to reach the limit I need even after I decompress it again. On the other hand, I need the image after it’s transported to be printed on an ID cards; therefore I need it with good quality.
That’s why I’m looking for either a compression tool that compress the image till that extend with good quality, or the have a tool could fix the decompressed image by adjusting the sharpness ,.. Etc. BTW, all mentioned solutions are going to be done automatically on the runtime, no user should handle these issues.
Any ideas to help me.
Thanx all
|
|
|
|
|
You can use the PNG format to losslessly compress an image (i.e. you won't lose any image quality) but it won't reduce the file size by anything near as much as JPEG compression does (since JPEG works by throwing away "less important" data, which is why the quality goes down)
Something else to try is that the JPEG format has a quality setting - so you can experiment with what quality you use when compressing your images until you find the right trade-off between quality and size.
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
If you access a shared folder on your local network and it is protected a popup will appear to ask for a valid login (e.g. 'Administrator', 'hiddenpassw'). Problem is: To extend a existing project to access shared folders I need to now, how to specify the login-data. The user and password are given to me by a web-interface. All I have to do is making this folder available as a local drive. Problem is: I do not know how to login automatically to the remote computer. And I haven't found the right keywords for a search. Any hints?
Regards,
Oliver Gerlach
|
|
|
|
|
Khor1701 wrote:
Any hints?
How about NetUseAdd() or LogonUser() ?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi!!
I want to do some sort of certification in Microsoft VC++ 6.0. Can any1 pls let me know what kinds of certification exist and where I may find info reg. the same?
I have been working on VC++ since the past 2 years and I have no Knowledge of .Net?
Can some1 pls provide an update??
Thanks!
Mahadevan.
|
|
|
|
|
hi Mahadevan,
As Per I know.
MS provide MCSD and MCSD.net certification
MCSD has two exams ( core exams ) that u can give in VC++ ( Desktop & Destributed ). Codes are 70-015 & 70-016. But these exams are expired. So MS will not treat u as MVP or MCSD.
MCSD.net has same exams but they are in .Net side.
If you come to know more about this give me update, I am also have same profile as u.
Thanks
Jetli
Constant Thing In World Is Change.
|
|
|
|
|
Read all about it here and here.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
what does L"c:\tmp.jpg" means? i.e What L means ?
how convert from BSTR to WCHAR * ?
|
|
|
|
|
Anand for every one wrote:
what does L"c:\tmp.jpg" means? i.e What L means ?
It Instruct Compiler to Treat String as Wide Character instead of normal MBCS character
"I Think this Will Help"
[Vote One Here,.....]
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
MultiByteToWideChar 。
this API should be help you .
|
|
|
|
|
A Small Mistake!
WCHAR and BSTR are both Wide Character string but implementaion is different.
zhang800605 wrote:
MultiByteToWideChar
will not work in this situation.Better use String Conversion Macros i.e. W2T,T2BSTR etc
"I Think this Will Help"
[Vote One Here,.....]
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Hie all,
void max(void);
class B;
class A{
public:
B f;
};
class B
{
};
int main(int argc, char* argv[])
{
max();
return 0;
}
void max(void)
{
}
In the above code fragment.call to max is allowed..but the object f of class B inside class A is not allowed.Y it is so?
|
|
|
|
|
Till I interpret your Code is Alright,anyway which compiler are you using for compiling above.it's working fine on My Visual C++ 6.0 Sp5 compiler.
"I Think this Will Help"
[Vote One Here,.....]
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|