BinaryByter
BinaryByter
getline only breaks on newline
Mat
What did you put in input?
BinaryByter
that's what you are looking for
Anonymous
Space and new line are different things
I know but my question is why it doesn't handle them as different things
BinaryByter
What did you put in input?
"first <space> input"
Mat
Oh ok
Mat
So first is first strinf
BinaryByter
no, first string is "first", second string is "string"
Prometheus
I know but my question is why it doesn't handle them as different things
Just edit the header file to get it to work the way you want lol.
BinaryByter
and like printf ??
use sys_write with file descriptor 1
Anonymous
becasue thats how cin works
well , at least they could terminate it and get only the first string but feeding buffers based on the user input and moving the application flow based on that is a bit .. tricky
BinaryByter
you are searching for getline
Anonymous
getline
ah thanks
Mat
Cin just read the input buffer. If you fill it with stuff, it will continue to read from it
BinaryByter
operator » only reads until the next space or newline
BinaryByter
getline until the next newline
BinaryByter
getline until the next newline
in generall all the fstream relevant stuff is in cin
Mat
Getline will read lines from the input if you fill it with lines, right?
Anonymous
Cin just read the input buffer. If you fill it with stuff, it will continue to read from it
in simpler terms , it will still cut and feed as far as it see a next cin call in the file
Mat
Cin with spaces and newlines, getline only with newlines
Mat
Remember that you can use them with files and other things
Mat
It's not meant to be optimized for human interaction
BinaryByter
It's not meant to be optimized for human interaction
both human interaction and normal files behave the same
BinaryByter
they are segmented into lines and words
BinaryByter
cin is for getting a single word
BinaryByter
remember that it is inefficient to parse a string until you see a "\n"
BinaryByter
so if you only need a single word, it is much better to use cin instead of parsing a full line twice
Mat
both human interaction and normal files behave the same
A file have a more defined behaviour :P and it's not about interpretation of what a string should be
Mat
But yeah, at the end they're the same
Mat
Obv
BinaryByter
A file have a more defined behaviour :P and it's not about interpretation of what a string should be
a file doesn't have more defined behaviour than what the human inputs, atleast not content-wise
Anonymous
any pdf assembly language tutorials please
BinaryByter
any pdf assembly language tutorials please
I made a series of youtube-videos a few years back
BinaryByter
but I won't share them
BinaryByter
because they suck balls
Anonymous
but I won't share them
just send me the link please lol!
BinaryByter
just send me the link please lol!
google "assembly tutorial filetype:pdf" there are more than plenty resources
Anonymous
google "assembly tutorial filetype:pdf" there are more than plenty resources
they don't a deeper explanation that someone can understand
Anonymous
have
BinaryByter
they do
BinaryByter
it's just that you don't know the basics
Anonymous
i need the one that is compaired with C++ .Atleast i can get something
Compilation
Anyone knows android and using camera api ?
Dexter
What is the error when i take values such that X<Y<Z For example take X=1 Y=2 Z=3
Dexter
What is the error when i take values such that X<Y<Z For example take X=1 Y=2 Z=3
The code compiles and runs in codeblocks but it isn't printing the final result
Dexter
In Visual Studio when i input values as 1 2 3 It compiles and then it shuts down immediately
Mat
How do you do input?
Mat
I mean your input
Mat
Like "4 5 6" ot "4\n5\n6"
Mat
What do you type
Dexter
I mean your input
It took the values of xyz from me It actually ran and then crashed
Dipankar
I mean your input
int number; printf("Enter a number: "); scanf("%d", &number);
Mihail
Dexter
Yess
Dexter
I can
Mat
Yess
So you write "3 4 5\n" and then nothing happens
Dexter
Yeah
Mihail
Anyone knows android and using camera api ?
https://github.com/googlesamples/android-ndk
Dexter
When i type something like X<Y<Z
Compilation
Check the ndk camera example
Thanks, just looking for a way to fix camera’s orientation that works
Compilation
Is there any telegram group for android developers ? Cant find any !
Anonymous
Any hacker here???
BinaryByter
Yes
BinaryByter
I hack stuff together
BinaryByter
so i'd call myself a hacker
Anonymous
Together mean??