I am updating to the database, the values read from the GUI.In this process when i==3,in that particular location in my database(row==264),it is skipping without updating and is moving to the next row.
class EmpTransAdd : public EmpTrans
class EmpTransChange : public EmpTrans
class EmpTransDelete : public EmpTrans
When I compile and link this source I get the error,
when I remove the virtaul function from the Apply function, everything works fine.
What is the problem?
Do I need to take out the other classes from the source? or to include them inside the ifdef?
You don't provide a body for the EmpTrans::Open(), EmpTrans::Close(), EmpTrans::Apply functions (well at least you didn't show us). You still need to provide a body for those functions in the base class, unless they are pure virtual functions (e.g. virtual void Apply() = 0;), in which case it is mandatory that each child classes implement this function.
i am developing a worm scanner..
i have to choose the directories from Folder Browser Dialog..
when i does that i will get the directory C:\NVIDIA\Win2KXP
but i need to convert it to C:\\NVIDIA\\Win2KXP so that i can get the file names in the that directory using ListFiles......
since the symbol \ i could not put \ between "" and ''
I am trying to write a simple callback function for my own purpose, not to pass into Windows API as callback arguments. What I did below gets access violation. Where did I do wrong in the below code? Thanks.
But your code doesn't look bad to me. Just more indirection than you need. fC is already a type of "pointer to a function", so why make things work with "pointer to a pointer to a function"?
In the interests of science, I added these two lines to main:
fC p0 = fc;
fC *p1 = &fc;
And on the second line I get: "error C2440: 'initializing' : cannot convert from 'void (__cdecl *)(int *)' to 'void (__cdecl ** )(int *)'".
This leads me to suggest that you're seeing the same behaviour as when you try to get a pointer to an array - you get the first element of the array back. This is probably a C thing that's biting you. And then you manually cast it in your original main and things blow up later...
That's my theory, anyway!
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!