Do you know why eclipse console first executes gets function and then cout? I have this code:
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
  char str[80];
  cout << "Enter any string: ";
  gets(str);
  cout << "Here is your string: ";
  cout << str;
  return 0;
}
It's just a test
Enter any string: Here is your string: It's just a test
P.S. This program works as it should if i'm using DOS console.
 
     
     
     
    