Click here to Skip to main content
16,011,883 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
JokeRe: Code Pin
ThatsAlok11-Oct-07 3:22
ThatsAlok11-Oct-07 3:22 
GeneralRe: Code Pin
jhwurmbach11-Oct-07 3:35
jhwurmbach11-Oct-07 3:35 
GeneralRe: Code Pin
jhwurmbach11-Oct-07 3:35
jhwurmbach11-Oct-07 3:35 
Questionhow to delete specific elements in a char pointer Pin
Priya_Sundar10-Oct-07 22:58
Priya_Sundar10-Oct-07 22:58 
AnswerRe: how to delete specific elements in a char pointer Pin
chandu00410-Oct-07 23:17
chandu00410-Oct-07 23:17 
GeneralRe: how to delete specific elements in a char pointer Pin
toxcct10-Oct-07 23:22
toxcct10-Oct-07 23:22 
GeneralRe: how to delete specific elements in a char pointer Pin
chandu00411-Oct-07 4:04
chandu00411-Oct-07 4:04 
GeneralRe: how to delete specific elements in a char pointer Pin
Priya_Sundar10-Oct-07 23:45
Priya_Sundar10-Oct-07 23:45 
Thanks for your concern.

Yes i use MFC.

By your question, I got an idea to convert it into a CString and apply delete and then save it back - something like this;

<br />
    unsigned char *String;<br />
	<br />
    CString cString,result;<br />
    cString="{abcdef}";<br />
    int n=cString.GetLength();<br />
    result=cString.Mid(1,n-2);<br />
<br />
    String = (BSTR)rest; <br />


However, here i am not able to store it back to 'String'. i am getting various compiler errors like

" error C2440: 'type cast' : cannot convert from 'class CString' to 'unsigned short *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called "

Need help in typecasting in the last line.



Priya Sundar

GeneralRe: how to delete specific elements in a char pointer Pin
jhwurmbach11-Oct-07 0:46
jhwurmbach11-Oct-07 0:46 
GeneralRe: how to delete specific elements in a char pointer Pin
Priya_Sundar11-Oct-07 1:35
Priya_Sundar11-Oct-07 1:35 
GeneralRe: how to delete specific elements in a char pointer Pin
jhwurmbach11-Oct-07 1:50
jhwurmbach11-Oct-07 1:50 
GeneralRe: how to delete specific elements in a char pointer Pin
Priya_Sundar11-Oct-07 2:41
Priya_Sundar11-Oct-07 2:41 
GeneralRe: how to delete specific elements in a char pointer Pin
jhwurmbach11-Oct-07 3:31
jhwurmbach11-Oct-07 3:31 
GeneralRe: how to delete specific elements in a char pointer Pin
Priya_Sundar11-Oct-07 1:42
Priya_Sundar11-Oct-07 1:42 
GeneralRe: how to delete specific elements in a char pointer Pin
toxcct11-Oct-07 1:48
toxcct11-Oct-07 1:48 
GeneralRe: how to delete specific elements in a char pointer Pin
jhwurmbach11-Oct-07 1:58
jhwurmbach11-Oct-07 1:58 
QuestionRe: how to delete specific elements in a char pointer Pin
David Crow11-Oct-07 3:45
David Crow11-Oct-07 3:45 
GeneralRe: how to delete specific elements in a char pointer [modified] Pin
chandu00411-Oct-07 4:01
chandu00411-Oct-07 4:01 
GeneralRe: how to delete specific elements in a char pointer Pin
chandu00411-Oct-07 4:05
chandu00411-Oct-07 4:05 
GeneralRe: how to delete specific elements in a char pointer Pin
Matthew Faithfull10-Oct-07 23:23
Matthew Faithfull10-Oct-07 23:23 
AnswerRe: how to delete specific elements in a char pointer Pin
toxcct10-Oct-07 23:33
toxcct10-Oct-07 23:33 
GeneralRe: how to delete specific elements in a char pointer Pin
Priya_Sundar10-Oct-07 23:48
Priya_Sundar10-Oct-07 23:48 
GeneralRe: how to delete specific elements in a char pointer Pin
jhwurmbach11-Oct-07 0:48
jhwurmbach11-Oct-07 0:48 
AnswerRe: how to delete specific elements in a char pointer [modified] Pin
Nelek11-Oct-07 0:15
protectorNelek11-Oct-07 0:15 
QuestionHow to use InvokeHelper function in C++? Pin
PhanMinhDuy10-Oct-07 22:37
PhanMinhDuy10-Oct-07 22:37 

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.