Jump to content

Input Text (for beginners)

- - - - -

  • Please log in to reply
No replies to this topic

#1
michaelvd12

michaelvd12

    Learning Programmer

  • Members
  • PipPipPip
  • 99 posts
Hi ,

This is my second tutorial,

First we gonna further with the finaly source code of my previous tutorial

Step 1 :

Initialize the input function.

int word;

Step 2 :

Change the drawing text.

cout << "Typ your text or sentence in here : ";

Step 3 :

Put the text that the users have typed in the word function.

getline(cin, word);

Step 4:

Draw the word function on the screen.

cout << "You have typed : " << word << "\n";

The bold text draws the text to the screen and the << "\n" text made a new line on the screen ;)

Compile and run, Look , You have made your second bigger application !

Michael van Dijk.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users