Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to delete characters from an array buffer ?

Status
Not open for further replies.

jeffy665

Newbie level 4
Joined
Aug 10, 2012
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,322
How to delete a characters from an array buffer for example I have an array buffer of length 14 it can store this string "?01SRR00080065" but i want to store a size of 8 character buffer IE "?01SRW68" when i run the program i am getting "?01SRW68080065" this output that means overwriting to the previous string,how can I get an output as"?01SRW68" in the same buffer of 14 size.I am doing an Embedded application in that the serial port receive these strings.
 

Your routine probably shows the content until it finds a null character so basically write the 8 characters that you want in positions 0-7 and set position 8 to null (array[8]=0;).
 

Character is a byte variable. Array of chars is pointer to memory, where this variable stores. You can't just delete a character. You should use an routine that will recount the array with your rules.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top