Click here to Skip to main content
15,922,407 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to Write an RS422 Interface in C++ Pin
Ryan Binns31-Aug-04 18:31
Ryan Binns31-Aug-04 18:31 
GeneralRe: How to Write an RS422 Interface in C++ Pin
Norman Hines2-Sep-04 14:22
Norman Hines2-Sep-04 14:22 
GeneralRe: How to Write an RS422 Interface in C++ Pin
Ryan Binns2-Sep-04 15:16
Ryan Binns2-Sep-04 15:16 
GeneralRe: How to Write an RS422 Interface in C++ Pin
Norman Hines2-Sep-04 15:29
Norman Hines2-Sep-04 15:29 
GeneralRe: How to Write an RS422 Interface in C++ Pin
Ryan Binns2-Sep-04 16:46
Ryan Binns2-Sep-04 16:46 
QuestionHow to find Memory Over Flow ? Pin
Amarelia31-Aug-04 11:50
Amarelia31-Aug-04 11:50 
AnswerRe: How to find Memory Over Flow ? Pin
mahade131-Aug-04 18:36
mahade131-Aug-04 18:36 
Generalconst char * Pin
rtb33331-Aug-04 11:47
rtb33331-Aug-04 11:47 
Hi, I am trying to understand a C/C++ concept with pointers.

I have a function that expects a LCPSTR.
If I hard code a statement such as
LCPSTR temp = "213234";
it works great.
However I have a char array I would like to
use for this value that is input from a user. How can I convert
a char array to a LCPSTR type?

Is this a valid approach?
___
CHAR bob[25];
//...put something in bob - like "123456"...
LCPSTR temp2 = (LCPSTR) &bob[0];

Then pass temp2 to the function that requests a LCPSTR?
Will that only grab the first item ("1") in the array or all of it ("123456")???
____

I'm not sure if I have made sense.
In general - what do you do when you have a char array or char *
and a function is asking for a const char * ? How do you make that conversion?
GeneralRe: const char * Pin
Ryan Binns31-Aug-04 18:36
Ryan Binns31-Aug-04 18:36 
Generalopening a command prompt inside a cdialog Pin
mickelliot31-Aug-04 11:13
mickelliot31-Aug-04 11:13 
GeneralRe: opening a command prompt inside a cdialog Pin
vcplusplus31-Aug-04 11:38
vcplusplus31-Aug-04 11:38 
GeneralCFormView and ActiveX Controls... Pin
herbert_chow31-Aug-04 10:57
herbert_chow31-Aug-04 10:57 
GeneralRe: CFormView and ActiveX Controls... Pin
herbert_chow31-Aug-04 14:12
herbert_chow31-Aug-04 14:12 
QuestionOverlay mode? Pin
Vilo99931-Aug-04 9:18
Vilo99931-Aug-04 9:18 
AnswerRe: Folder path for any Win OS? Pin
vcplusplus31-Aug-04 7:52
vcplusplus31-Aug-04 7:52 
GeneralGDI+ VC++ Access Violation Pin
Nicholas Cardi31-Aug-04 7:22
Nicholas Cardi31-Aug-04 7:22 
GeneralRe: GDI+ VC++ Access Violation Pin
Anonymous31-Aug-04 7:29
Anonymous31-Aug-04 7:29 
GeneralRe: GDI+ VC++ Access Violation Pin
Nicholas Cardi31-Aug-04 7:33
Nicholas Cardi31-Aug-04 7:33 
GeneralRe: GDI+ VC++ Access Violation Pin
Nicholas Cardi31-Aug-04 11:02
Nicholas Cardi31-Aug-04 11:02 
QuestionFolder path for any Win OS? Pin
nigma_x31-Aug-04 7:01
nigma_x31-Aug-04 7:01 
AnswerRe: Folder path for any Win OS? Pin
Nicholas Cardi31-Aug-04 7:30
Nicholas Cardi31-Aug-04 7:30 
AnswerRe: Folder path for any Win OS? Pin
Ravi Bhavnani31-Aug-04 7:31
professionalRavi Bhavnani31-Aug-04 7:31 
Generalsecurity project password cracker Pin
gtre691431-Aug-04 6:53
gtre691431-Aug-04 6:53 
GeneralRe: security project password cracker Pin
Ravi Bhavnani31-Aug-04 7:29
professionalRavi Bhavnani31-Aug-04 7:29 
GeneralDisabling Keyboard in Win2000 / XP Pin
Ivan Cachicatari31-Aug-04 6:16
Ivan Cachicatari31-Aug-04 6:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.