|
The sqlite function is defined as:
<br />
int sqlite3_open(<br />
const char *filename, <br />
sqlite3 **ppDb <br />
);<br />
Based on the error, it looks like you've defined the function pointer as:
<br />
typedef int (*LPFNMLTPLY)(int,int);<br />
when it should be
<br />
typedef int (*LPFNMLTPLY)(const char*, sqlite3**);<br />
"My dog worries about the economy. Alpo is up to 99 cents a can. That's almost seven dollars in dog money" - Wacky humour found in a business magazine
|
|
|
|
|
Thanks you ....
You help to solve the problem ......
you are right !
I Find that Line I write ==> typedef int (*LPFNMLTPLY)(int,int);
when I modify ===> typedef int (*LPFNMLTPLY)(const char*, sqlite3**);
The complier is correct !!!
Thanks very much
Thanks
|
|
|
|
|
Okay guys, Can someone point me to a tutorial, beginners area for Embedded
MS CE programming with C++? I've got an Axiomtek GOT-2570S that was just
dropped in my lap. I've been given 6 weeks to learn it, develop an app for
it and have it ready to ship. So, I need a crash course in MS CE programming.
Please help.
Greg
|
|
|
|
|
1. Try the Mobile Development forum.
2. I'm trying to resist a comment about your ID, I really am
Elaine
The tigress is here
|
|
|
|
|
Kind of an oxymoron isn't it???(lol)
Thanks for the direction.
|
|
|
|
|
hi all ,
does anybody know how to convert const char * to LPCTSTR and vice versa ?
thank you.
-- modified at 11:35 Thursday 16th March, 2006
|
|
|
|
|
big_denny_200 wrote: anybody know how to convert const char * to LPCTSTR and vice versa
I thought LPCTSTR is for (Long Pointer To Constant String) which is same as const char *
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
i think what you wrote is LPCSTR not LPCTSTR
I have passed const char* object to a method which required LPCTSTR and got an error.
don't know exactly I am pretty new to C++
|
|
|
|
|
because you might have UNICODE set on your project. haven't you ?
|
|
|
|
|
yes, but i need to do the convertion anyway.
because i use some function that returns const char* and then need to pass it to function which requires LPCTSTR .
can you help ?
|
|
|
|
|
you didn't answer to my question.
do you have unicode enabled in your project or not ?
see W2A() and A2W() macros for such conversion anyway...
|
|
|
|
|
actually, T is for TCHAR, so it is a typedef to const TCHAR*
|
|
|
|
|
The "T" doesn't mean Unicode. A TCHAR can be either char or wchar_t depending on if your building a Unicode build or not. It depends on the UNICODE , _UNICODE and _MBCS preprocessor definitions.
Steve
|
|
|
|
|
it doesn't mean unicode,, but it's still there for it
|
|
|
|
|
|
OK, I have read just about every printing example I can find and I still cannot find a way to do this.
In my app, non-MFC, I have a listview containing quite a bit of data. I need to be able to print this data as a table. Printing lines of text and bitmaps is no problem, but when it comes to trying to structure this data it's getting a little confusing.
The table itself will never change, only the text and cell data. So It's no problem to create a template stored in the resources to which I can simply add cell values. But what sort of file should I create that can easily be populated and printed?
Please somebody kick me towards the right link.
|
|
|
|
|
Check out the Printing section on the left menu.
http://www.codeproject.com/printing/printlib.asp[^]
This article has a sample of defining printing tables.
He was a snowflake, like other "unique" snowflakes, falling down, getting stepped on, and pushed aside to disappear.
|
|
|
|
|
Hi all,
I have already a standad Visual C++ . NET, version from year 2003.
And, with this Visual C++ . NET [ version 2003], is it necessary to download VC++ Express Edition 2005?
Also, is it fully compatible with SDK plateforme + DirectX 9 installad from February 2006?
And, with this Visual C++ . NET [ version 2003], y is it necessary to download VC++ Express Edition 2005?
Thanks a lot
Regards!
|
|
|
|
|
Visual C++ .NET 2003 and Visual C++ 2005 are two (almost) completely different languages. the 2005 version cleans the syntax up A LOT and is called C++/CLI. The express edition should be compatible with any recent SDK's. I recommend downloading 2005 since it's free, and it makes it a lot easier to target the .NET platform
Thanks,
John
|
|
|
|
|
thanks a lot,
So...
I was hesitating as I earlier kept the Visual C++.Net.
In fact up to this month, Visual C++ 6.0 was offering the advantage to provide a lot of tips..etc.. as well as books, references.
Instaed than VC++.Net stayed almost without publication and not so much referenced.
So,as an expert, your advice would be to jump on Visual C++ Express Edition 2005 [ even if beta version] and programming with C++ is fine. However, programming Windows changes a lot, requires SDK and Direct X 9 are a plus .
And this is the end of VC++ 6 ( a pity honestly if we consider the difficulties to convert from VC++ 6)
thanks a lot
Regards
TPP
|
|
|
|
|
Why can I cast a pointer to a static non-class function to DWORD (for example), but not a pointer to a non-static class function? (The compiler generates an error if you try)
ie:
DWORD dw1 = (DWORD)fnStaticGlobalFunc; // OK
DWORD dw2 = (DWORD)pMyClass->fnClassLocalFunc; // Error
|
|
|
|
|
Martijn van Kleef wrote: The compiler generates an error if you try
and what does it say ?
|
|
|
|
|
Sorry, didn't include it because this:
c:\Documents and Settings\Martijnv\My Documents\Visual Studio Projects\TestWin32Console\TestWin32Console\TestWin32Console.cpp(193) : error C2440: 'type cast' : cannot convert from 'void (__thiscall X::* )(void)' to 'DWORD'
There is no context in which this conversion is possible
...still doesn't tell me why I CAN cast the static global function to DWORD but CANNOT cast the non-static class member function.
|
|
|
|
|
Notice the __thiscall X:: part of the type - that means the function is a member of class X and takes a X* parameter (which becomes this in the method). You can't cast that away.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
For non class functions, the compiler knows exactly where the function resides.
For class members it doesn't.
class base {
public: virtual void fn() {}
};
class derrived {
public: virtual void fn() {}
};
base *p = new derrived;
DWORD dw = (DWORD)p->fn; // which fn??
|
|
|
|