Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

enter items in array until enter is pressed c++

// low-level.cpp
#include <iostream>
using namespace std;

int main()
  {
  cout << "Press the ENTER key";
  if (cin.get() == '
')
    cout << "Good job.
";
  else
    cout << "I meant ONLY the ENTER key... Oh well.
";
  return 0;
  }
Source by cplusplus.com #
 
PREVIOUS NEXT
Tagged: #enter #items #array #enter #pressed
ADD COMMENT
Topic
Name
8+5 =