+ 2
13th Sep 2019, 1:18 AM
Patrick Allsop
Patrick Allsop - avatar
3 Answers
+ 7
Your code: #include <iostream> using namespace std; int main() { cout >> "hello humans"; return 0; } //use << cout<<"hello humans"; << is used with cout >> is used with cin << is stream insertion operator that insert content (variable , constant) on it's right side to specified stream. >> is stream extraction operator that extract data from specified stream and store it in variable.
13th Sep 2019, 1:24 AM
šŸ‡®šŸ‡³OmkaršŸ•‰
šŸ‡®šŸ‡³OmkaršŸ•‰ - avatar
+ 5
Patrick Allsop You are welcome ^^ nd use this trick to remember in beginning. cin is object of standard input stream . (For a while remember it as your keyboard from which you give input) cout is object of standard outputs stream. (Remember as console screen on which you get output) << >> these arrows can actually help you determine direction of data. The tip of arrow shows where the data goes and another end tells you from where data comes. cin>>myvar; //data comes from keyboard (cin) goes to myvar. cout<<myvar; //data is in myvar, and it goes to output screen (cout) Hope it helps =) Wish you good luck ..
13th Sep 2019, 1:47 AM
šŸ‡®šŸ‡³OmkaršŸ•‰
šŸ‡®šŸ‡³OmkaršŸ•‰ - avatar
+ 1
Thank you very much for the help I will be sure to remember
13th Sep 2019, 1:37 AM
Patrick Allsop
Patrick Allsop - avatar