Online compiler help!!!

2 replies [Last post]
ankushkool
Offline
Last seen: 10 years 11 weeks ago
Joined: 2009-08-04
bOt Points: 54

I have having some troubles using de online compiler...


the 'cin' command is not working properly.


following is de code i n compiling :

 

CODE :

 

#include <iostream>
using namespace std;

int main ()
{
int x;
cout<<"Enter value of x : ";
cin>>x;

cout<<"x : "<<x;

return 0;
}

 

OUTPUT : 

 

Enter value of x : x : 5979296

 

 

please someone help...

shubham
Offline
Last seen: 7 years 12 weeks ago
Joined: 2009-05-28
bOt Points: 134
query reply!!

Hi ankushkool....

 

actually we have not made online compiler interactive which means it will not accept in any case accept data from users. For every command which request a user input like cin etc. it assumes a arbit value.

 

We have done so coz of some security reasons, vey soon we will come with this facility.

 

for further query keep posting!!

bOtskOOl
Offline
Last seen: 9 years 31 weeks ago
Joined: 2009-02-21
bOt Points: 3500
Re: Online compiler help!!!

Hi ankushkool,

Input commands are not accepted right now by our online compiler. And output commands instead of cout you can use printf and other such similar commands.