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?
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.
+ 1
true, i mixed it with scanf. thank you.
0
post your code
0
It's posted on my profile
0
Can you again explain what is your problem with cin and cout?
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
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.
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.