delete the last letter in char

Hi,

how can i remove the last letter in a char?

Best regards

Jannis

how can i remove the last letter in a char?

Simple. There is only one letter in a char.

If you want to "remove" the last letter in a char ARRAY, simply set the appropriate position in the array to NULL ('\0').

I get a char from a keyboard.
I have a ps2keyboard connected to the arduino and get a char from the keyboard.

When i press backspace, i want to clear the last letter in the char

How can i do that

What do you do with the single character, the char, when you receive it ? Is it stored, printer, what ?

How about you post your code.

I will print it to a lcd. Oh i understand. I must save it to a string? I have tried it. How can i save a char in a string?

How can i save a char in a string?

It's not much use for anything if you don't save it. Have a look at Serial input basics

I have a ps2keyboard connected to the arduino and get a char from the keyboard.

As a matter of interest how is the keyboard connected and how do you read from it ?

When i press backspace, i want to clear the last letter in the char

Move the cursor one place to the left (you did keep track of where the cursor is, didn't you?) and print a space.

Sorry i want to explain it to you but...

  1. I'm bad in english (i'm german)
  2. The script that i used is on an other pc

I use the ps2keyboard library http://playground.arduino.cc/Main/PS2Keyboard

The forum has a German section.