Andrew's Garage

Shrunk Expand

Primary Navigation

c++ key input

#include <iostream>
using std::cout;
using std::cin;

int main()
{
  char thing;

  cin >> thing;
  if (thing == 'a')
    cout << "You pressed 'a'!\n";
  else
    cout << "You pressed not-'a': " << thing << "\n";
  return 0;
}

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)

Related


Posted on 2016-08-11 11:19 AM by andrew Comment
Uncategorized

Related Posts

  • 2016-08-11 andrew

    MySql 관리

    Table에 생성되어 있는 Indexes 의 용량 확인 select database_name, table_name, index_name, round((stat_value*@@inn...
  • 2016-08-11 andrew

    Pair Programming Is Not Pair Coding

    from : https://dzone.com/articles/pair-programming-is-not-pair-coding?edition=675393 The reason pair...
« JQuery로 Checkbox check여부 확인 및 Label 활용 방법. c++ how to handling to arguments »

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

( optional )


©2025 boots Entries RSS and Comments RSS Child theme Boots of Raindrops Theme