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.

Visual C++ 2008 Question: How to read a text box into an array

Status
Not open for further replies.

Felis_Silvestris

Junior Member level 2
Joined
Dec 27, 2007
Messages
23
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,283
Location
San Jose, CA
Activity points
1,517
I’m totally stuck.

Here is what I’m trying to do:

I’m using Visual C++ 2008 and built a form that uses a text box

The user enters a four digit alphanumeric code into the text box.

I read this text using: textbox->text

Next, I need to separate the four digits into ASCII code.

The ASCII code of each character is placed in this array (exactly like this)

InputBuffer[2] = <ascii code of first digit>;
InputBuffer[3] = <ascii code of second digit>;
InputBuffer[4] = <ascii code of thrid digit>;
InputBuffer[5] = <ascii code of fourth digit>;
 

can u tell what is the application type (MFC or win32) ?

if i assume you are using MFC, then i think textbox->text should be a CString object, and you can call textbox->text[0], textbox->text[1] etc..., to extract the ascii code of the digits.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top