LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 01-10-2011, 01:56 AM   #1
suren.ind
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Rep: Reputation: 0
Giving input to Cin command in kdevelop4


Where can i give input to cin in kdevelop4 my program is

#include <iostream>
using namespace std;
int main()
{
cout<< "Hello Linux"<<endl;
cout<< "My first Linux C program"<< endl;
for (int i=0;i<5;i++)
{
cout<<i<<endl;
}
int j;
cout << "Enter the value of j"<< endl;
cin >> j;
return 0;
}

i built the file and executed it

but i do not know where to give input to j.
 
Old 01-10-2011, 02:43 AM   #2
JoshyJ
Member
 
Registered: Nov 2003
Location: Sydney , Australia
Distribution: Fedora
Posts: 49

Rep: Reputation: 1
What are you trying to achieve? You would be inputing 'j' but nothing is using j or outputting j.

Last edited by JoshyJ; 01-10-2011 at 02:46 AM.
 
Old 01-10-2011, 03:21 AM   #3
suren.ind
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Original Poster
Rep: Reputation: 0
i am new to linux and so i am familiarising with it ... there is no meaning for the program if u r asking for it... i just wanted to give input...but i do not know where to give
 
Old 01-12-2011, 03:10 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

http://www.linuxquestions.org/questi...op-4-a-855586/
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Giving output of a command as the input to another whirlpool Programming 5 09-07-2010 04:31 PM
C++. cin does not wait for an input by the operator iqbala Programming 7 01-11-2010 01:32 PM
Limiting input in cin nominruil Programming 1 06-21-2005 10:45 PM


All times are GMT -5. The time now is 03:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration