Yes Complex is a class of STL, but it won't help you either, try this
complex<double> x, y, r;
r = pow(x, y);
//r.real is -1.#IND00000
//r.imag is 0.0
//Still the same answer
r = exp(y * log(x));
//r.real is 0.5
//r.imag is 0.866025
//This is the answer Tim already gave you.
So as I said, you will have to do some preprocessing or redefine pow yourself
::VkKeyScan translates a character to the corresponding virtual-key code and shift state for the current keyboard, but which function does the reverse and translates the VK code and shift state to a character, is there any? Thanks.
i want to make a keyboard driver. my aim is to type any Indian languages in ms word or excel or notepad etc.what are the code words for hooking ( trap ) a key stroke and post it to a desired application. i have some idea first we have to get the focus of the window ( get focus api) then each keystroke has to be trapped and converted to their ascii. Then using post message api converted ascii is passed to the input focus window.
but i am not sure, pls give me a small program by which when we type 'a' in the keyboard we must get 'b' in the desired window. thanks
The icon is resized to 32x32 and doesn't fit in the status bar. The CApp::LoadIcon documentation says it can only be used to load an icon whose size conforms to the SM_CXICON and SM_CYICON system metric. It says to use LoadImage instead. So, I tried this:
An unrelated coment to your problem, I saw you used GetLastError() just to check what was wrong with the LoadImage call, good news for you, you don't have to type those two lines ever again, you can check the registers and pseudoregister and see among other things, the last error directly, to better undestand what I'm talking about, check this article An introduction to debugging in MSVC++ using Pseudoregisters By Wouter Dhondt
i want exercise iostream also support the file's input and output,so write the little program below,but after compile ,note"error C2065: 'String' : undeclared identifier",can you help me to solve it?
the program function is:read word from a text file named "in_file",and write every word into a output file named "out_file" .
cerr<<"error:unable to open input file!\n";
cerr<<"error:unable to open output file!\n";
} String word;
You have a few problems here. First, you are using the old iostream headers instead of the STL ones. Change them to <fstream> and <iostream> without the .h extension.
Also, string.h is the C library header with the C-style string functions. You want to #include <string>
Next, the type is string not String.
And finally, as the other post said, you need to use the std:: namespace name before the types because STL types are in that namespace.
More details on the iostream vs. STL headers here[^]