0

C++ user input difficulty

i know that cin>> is the input command, but i am having trouble getting my program to use the data other than a simple return with cout<<. trying to disassemble and rearrange a string of input for use by the program. can someone please help?

5th Apr 2018, 6:32 AM
ArcticWolf
ArcticWolf - avatar
8 Respostas
+ 1
Ohhh, no if you have int a then u have to use cin>>a. It is not like scanf when you have to pass reference. Streams works different. Learn how streams in c++ works.
5th Apr 2018, 7:02 AM
Bartosz Pieszko
Bartosz Pieszko - avatar
+ 1
true, i mixed it with scanf. thank you.
5th Apr 2018, 7:06 AM
Zdravko
Zdravko - avatar
0
post your code
5th Apr 2018, 6:38 AM
Abhishek Rawat
Abhishek Rawat - avatar
0
It's posted on my profile
5th Apr 2018, 6:44 AM
ArcticWolf
ArcticWolf - avatar
0
Can you again explain what is your problem with cin and cout?
5th Apr 2018, 6:54 AM
Bartosz Pieszko
Bartosz Pieszko - avatar
0
if i correctly got your problem. you want the user to enter number and not being put by the coder itself.. right? And i am working on it bit sometimes my code working correctly sometimes not... hah don't know.. will correct that
5th Apr 2018, 7:08 AM
Abhishek Rawat
Abhishek Rawat - avatar
0
I am trying to incorporate a user input cin>> into the bubbleSort code. I explain in the comments exactly where and what I'm trying to do.
5th Apr 2018, 7:11 AM
ArcticWolf
ArcticWolf - avatar
0
Thank you Bartosz Pieszko for the reply, I went back to that lesson and found my answer. my updated code will be up in a couple days.
5th Apr 2018, 8:57 AM
ArcticWolf
ArcticWolf - avatar