Click here to Skip to main content
15,915,164 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
What about...

unsigned char *srcString = "{abcdef}";
unsigned char *dstString = "";


memcpy (srcString+1, dstString, (srcString.length () - 2));


If it works you can still free the memory and delete the pointer avoiding the problem that Matthew said.
Up to that point you can work with *dstString as it was your original one.

Hope it helps

P.S. Im not sure if it works, I just asked about buffers and how to get parts of the memory two/three days ago, and this is something that I get from the answers I received.




-- modified at 6:29 Thursday 11th October, 2007

I forgot...

with the srcString + X you specify the first character you want without changing the "value" of where the pointer points.

at dsstString you can make the same leaving some intial chars unmodified adding X to his base adress

the last is the number of chars of the first string you wanna copy in the second

Greetings.

--------
M.D.V.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

Help me to understand what I'm saying, and I'll explain it better to you

Wink | ;)

QuestionHow to use InvokeHelper function in C++? Pin
PhanMinhDuy10-Oct-07 22:37
PhanMinhDuy10-Oct-07 22:37 
Question[SOLVED]type specifier for UINT64 Pin
chandu00410-Oct-07 22:36
chandu00410-Oct-07 22:36 
AnswerRe: type specifier for UINT64 Pin
Nelek10-Oct-07 22:51
protectorNelek10-Oct-07 22:51 
AnswerRe: type specifier for UINT64 Pin
Nibu babu thomas10-Oct-07 22:52
Nibu babu thomas10-Oct-07 22:52 
General[SOLVED] thanks Pin
chandu00410-Oct-07 22:59
chandu00410-Oct-07 22:59 
Questionhdc to Bitmap Pin
GauranG Shah10-Oct-07 22:11
GauranG Shah10-Oct-07 22:11 
AnswerRe: hdc to Bitmap Pin
Mark Salsbery11-Oct-07 12:50
Mark Salsbery11-Oct-07 12:50 
GeneralRe: hdc to Bitmap [modified] Pin
GauranG Shah11-Oct-07 18:59
GauranG Shah11-Oct-07 18:59 
GeneralRe: hdc to Bitmap Pin
Mark Salsbery11-Oct-07 20:56
Mark Salsbery11-Oct-07 20:56 
GeneralRe: hdc to Bitmap Pin
GauranG Shah11-Oct-07 22:58
GauranG Shah11-Oct-07 22:58 
GeneralRe: hdc to Bitmap Pin
Mark Salsbery12-Oct-07 4:57
Mark Salsbery12-Oct-07 4:57 
GeneralRe: hdc to Bitmap [SOLVED] Pin
GauranG Shah11-Oct-07 23:51
GauranG Shah11-Oct-07 23:51 
GeneralRe: hdc to Bitmap [SOLVED] Pin
Mark Salsbery12-Oct-07 4:58
Mark Salsbery12-Oct-07 4:58 
GeneralRe: hdc to Bitmap Pin
GauranG Shah10-Oct-07 23:24
GauranG Shah10-Oct-07 23:24 
GeneralRe: hdc to Bitmap Pin
GauranG Shah11-Oct-07 0:46
GauranG Shah11-Oct-07 0:46 
GeneralRe: hdc to Bitmap Pin
GauranG Shah11-Oct-07 2:00
GauranG Shah11-Oct-07 2:00 
GeneralRe: hdc to Bitmap Pin
Nelek11-Oct-07 2:39
protectorNelek11-Oct-07 2:39 

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.