Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How do you use PTSTR in C++

Status
Not open for further replies.

HerbertMunch

New Member
hi all,
does anyone know how to use the windows api type constructs such as PTSTR together with the normal C functions such as strcopy.

For instance strcopy requires strings defined as char* whereas the API returns strings defined with eg LPSTR.

Code:
char* str = "Hello";  // OK
LPSTR str = "Hello"; // Compiler error

If you declare LPSTR pszz; , how do you assign it to point to a string?

Thanks
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top