| | |
Problem with backspace button
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Feb 2009
Posts: 8
Reputation:
Solved Threads: 0
Hi!
This is my first post here
and I'm not good with english 
I hope that you will understand
I'm trying to enter a string with only numbers. I solved this but i dont know how to enable delete (backspace button) ?
I solve and this problem but backspace works (arrow go back) but text are not being deleted?
How can i solve this problem?
Here code example:
This is my first post here
and I'm not good with english 
I hope that you will understand

I'm trying to enter a string with only numbers. I solved this but i dont know how to enable delete (backspace button) ?
I solve and this problem but backspace works (arrow go back) but text are not being deleted?
How can i solve this problem?
Here code example:
C++ Syntax (Toggle Plain Text)
char backspace=8; while(1) { x=getch(); if (x=='\r') { s[i]='\0'; break; } if(isdigit(x) || x==backspace) { s[i]=x; i++; putch(x); } }
Last edited by UGndLord; Feb 12th, 2009 at 7:47 pm.
C++ Syntax (Toggle Plain Text)
... if(x==backspace) { i++; } ...
Last edited by cikara21; Feb 12th, 2009 at 9:02 pm.
![]() |
Similar Threads
- help,it's about my keyboard (USB Devices and other Peripherals)
- delete and backspace (JavaScript / DHTML / AJAX)
- How to disable back button and backspace using Javascript..? (JavaScript / DHTML / AJAX)
- password function (c++) (C++)
- Keyboard problem (USB Devices and other Peripherals)
Other Threads in the C++ Forum
- Previous Thread: Delete file thats in use
- Next Thread: How do i format my numbers correctly?
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion count data delete deploy desktop developer directshow dll download dynamic encryption error file forms fstream function functions game getline givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news node number output parameter pointer problem program programming project proxy python read recursion recursive return string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






