Thread: Easy i/o but just don't know

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    41

    Easy i/o but just don't know

    Hi guys help with the parts commentated i'm coming from
    c / c++ using a borland compiler.



    #include <vcl\vcl.h>
    #pragma hdrstop
    #include<iostream.h>
    #include "Unit1.h"
    //---------------------------------------------------------------------------
    #pragma resource "*.dfm"

    TForm1 *Form1;
    //---------------------------------------------------------------------------
    __fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
    {
    }
    //---------------------------------------------------------------------------
    void __fastcall TForm1::Button1Click(TObject *Sender)
    {
    int number;

    Memo1->Text="Input a number >"; /* How do I get a cursor at the end ready */
    /* for input */
    cin>>number; /* Is cin ok for gui */
    }
    /* How do I output my input in a gui */

    Thanks (leaner wanting to be a master)

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    I don't use Borland, but...

    >>> cin>>number; /* Is cin ok for gui */

    ... no. Since you are using VCL, I guess you will need to add an edit box control and read the text from there, then use another static control, (or similar), to output the result.

    I would seriously recomend you learn to use the Win32 API before using a class library like VCL.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Buffered/UnBuffered I/O
    By valaris in forum C Programming
    Replies: 1
    Last Post: 08-06-2008, 11:31 PM
  2. asynchronized I/O == multiplexing I/O?
    By George2 in forum C Programming
    Replies: 1
    Last Post: 07-24-2006, 10:06 AM
  3. why page based I/O can improve performance?
    By George2 in forum C Programming
    Replies: 1
    Last Post: 06-12-2006, 07:42 AM
  4. Overlapped I/O and Completion Port :: Winsock
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 10-30-2002, 05:14 PM
  5. WSAAsyncSelect I/O Mode :: Winsock
    By kuphryn in forum Windows Programming
    Replies: 1
    Last Post: 05-12-2002, 03:23 PM