hi knutso,
you need to pass a pointer to pointer to LD struct in order to return that to where are you calling it.
so instead of:
> int fetchData(HEAD *HD, LINE *LD){
use
int...
Type: Posts; User: damyan
hi knutso,
you need to pass a pointer to pointer to LD struct in order to return that to where are you calling it.
so instead of:
> int fetchData(HEAD *HD, LINE *LD){
use
int...
Hi itld,
Since the range that you wish to exclude is continious its prety easy. here is a little maths about the task
R[65..122] -> |R| = 122-65 = 57
but X%Y gives a number between [0..y-1] so...
Hi Shakespeare,
it is possible to emulate Alt+Enter via the 'keybd_event' function
but instead of VK_MENU and VK_ENTER use the second parameter of the function to specify the proper scan codes ....
Yes. The templates are the solution.
Here is one possible implementation of the above example using a template member function:
template <class T>
void enumobj(T* pInstance_of_T, void...
Hi ninebit,
in order to invoke a member function of an instance of a class you will need a pointer to that member function and a pointer (or a reference) to the right instance. If you are a bit...
Hi
'al+enter' can be simulated with keybd_event API
keybd_event(VK_MENU,0x38,0,0);
keybd_event(VK_RETURN,0x1c,0,0);
keybd_event(VK_RETURN,0x1c,KEYEVENTF_KEYUP,0);
...
Hi
if the two source bitmaps have the same structure (bitcount, plains, colordepth,etc.) and size, you can simply treat them as byte arrays, just adding and dividing each pair of bytes to form the...
Hi
declare these functions with extern "C" in your cpp code
or use extern "C++" in the C code, if the compiler support that.
damyan
Hi
instead of 'sprintf' just use 'vsprintf'
damyan
Hi
Yes it is a BIG problem!
if you interchange them then the value of the old 'firstPtr' will be lost forever with all the elemnts in the list too along it. Also the newPtr item will point to...
Hi
Your implementation do not allow extrnal access to 'first' and 'last' pointers in the List class so in order to write external, non-friend function that reverse a list you should use only the...
Hi
since you've not passed the list L as reference to your printList function
void printList(List<T> L) // here
a copy of the list is created temporary and passes so all the elements from...
Hi
if the power factor is not an integer you may use exponents and logarithms to do powers
1. a = y^x
2. log(a) = log(y^x)
3. log(a) = x*log(y)
4. exp(log(a)) = exp(x*log(y))
or finaly:
hey
>>> if (Location = -1)
<<< if (Location == -1)
and
>>> while ((Location = -1)&&(Start <= End))
<<< while ((Location == -1)&&(Start <= End))
Hi
this is a good thread about the srand(), so check it
http://www.cprogramming.com/cboard/showthread.php?s=&threadid=4621#post32861
ok.
just the result was unexpected and that's all.
hi
this is my implementation of the classical Minesweeper game that can be found on every Windows OS.
I like to give it as 'game developing tutorial' purposes if someone like to use it.
I made...
Ok
The Windows API to register a new window class is:
ATOM RegisterClass(
CONST WNDCLASS *lpWndClass // class data
);
browse the WNDCLASS structure and you will find its member:
#include <iostream.h>
int main(char*, char*[])
{
int c=0; cout<<c<<c++;
return 0;
}
you can expect from that code any other result but it displays "10" :-)))
//here is the code to swap it with one from the other window:
...
WNDPROC theOtherWndProc = (WNDPROC)GetWindowLong(hwndOther, GWL_WNDPROC);
WNDPROC yourOldWndProc =...
Hi
this should work:
CArray<CPoint, CPoint> arr;
arr.Add(CPoint(10,10));
arr.Add(CPoint(20,20));
arr.Add(CPoint(20,10));
CRgn region;
Hi
compile the progam as Console app under any Windows OS
#include <stdio.h>
int main(void){
printf("CrashMe\t\t\b\b\b\b\b\b");
printf("CrashMe\t\t\b\b\b\b\b\b");
return 0;
ok this can help you
#ifndef WS_EX_LAYERED
#define WS_EX_LAYERED 0x00080000
#define LWA_COLORKEY 0x00000001
#define LWA_ALPHA 0x00000002
#endif // ndef...
The problem is that when you invoke the
main_DestroyWindow the handle to the window is not valid
(the system releases the handle right after the PostQuitMessage(0)) and any API call usiing that...
Hi
If it is a console window from Windows use:
DWORD h1 = GetCurrentProcessId();
HANDLE h2 = OpenProcess(PROCESS_ALL_ACCESS, 0, h1);
-----
the code abowe is to retrive your process...