0

no output is generated
the sublime text terminal windows just keeps on taking input

  #include<iostream>
  using namespace std;
  int main()
  {
    int anumber;
    cout<<"please enter a number of decimal type :";
    cin>>anumber;
    cout<<"was this your number :"<<anumber;
  }
  • Have you tried compiling and running the program on the command line? It should work as expected. You hit Enter after typing the number, right (just to be sure)? – lubgr Sep 10 '18 at 14:41
  • yes after hitting enter it does nothing the cursor just simply moves on a new line every time i hit enter in the sublime text window – ozzy ozbourne Sep 10 '18 at 14:44
  • the programs terminates after i enter the value when i run in the ubuntu terminal – ozzy ozbourne Sep 10 '18 at 14:55
  • Your issue is the same as [this](https://stackoverflow.com/questions/10604409/sublime-text-2-console-input) even though you're not using Python or Sublime Text 2; Sublime does not allow you to interact with programs that are displaying their output in the output panel; you need to craft a build system that runs it externally instead. – OdatNurd Sep 10 '18 at 18:48

0 Answers0