BinaryByter
we cannot do everything for oyu
BinaryByter
This is a basic question - a bit of thinking will give you the solution
BinaryByter
or ATLEAST ask more specific questions
Raul
please if you don't want to join the discussions, at least don't obstruct.
My sincerest advice to you. Is to go and look up getch(). And then go write a small program that plays with getch(), and then build programs that build upon it. This is how I personally learned how to use built in tools.
🐰🐾 سمیه
I know google exists, and I have got the program on the internet. When I ask a qustion that means I couldn't have found the answer on my own and need a quick answer. I think the purpos of the group is that.
🐰🐾 سمیه
in persian we say: there is no shame in not knowing something, there's shame in not asking.
BinaryByter
BinaryByter
however, you might want to tell us atleast what you think about it so far
BinaryByter
and what you found out about it
Raul
in persian we say: there is no shame in not knowing something, there's shame in not asking.
That's not what I am saying though. There is absolutely no shame in asking, you are correct on that. What I am saying, is sometimes you need to be able to do these things in your own. This is in a program you found. So think like a computer scientist. How can I break this small part down? How can I make this easier? Then, in another editor. Write a small program with getch(), play with it, see if you end up understanding it.
Raul
I personally had to do this with vector, std::array, unordered_map, etc. Sometimes, I see something in code, I say, "what is this doing?" I then open up an editor, write a small program and play with it.
klimi
noo
klimi
bad reply
klimi
fk
BinaryByter
but it does that poorly
BinaryByter
you might want to look at other implementations
klimi
better than nothing
BinaryByter
like "openbsd"
klimi
whew
BinaryByter
yes
Raul
Lol amazing
klimi
i tired freebsd
BinaryByter
bsd is not as compatible as linux
BinaryByter
but its much much much more safe
klimi
i heard its more safe and easier to work with
BinaryByter
"more safer"
Raul
that's a difficult thing to do for a beginner. I'll do such things after a while.
Its not though. How long do you plan on being a beginner? Sometimes you have to do them yourself in order to learn more.
Raul
I didn't learn how to do Hello Triangle on OpenGL by asking, someone here 5 or 6 times on to explain what glfunctions are.
🐰🐾 سمیه
ok, thanks for the advice. and please let me chat here.
BinaryByter
#offtopic
BinaryByter
that group is for chitchat
klimi
that group is for chitchat
i dont think its chit chat
🐰🐾 سمیه
I meant let me ask questions
BinaryByter
you can ask questions
BinaryByter
but don't be repetitive
Raul
well there is nice tutorial for that
You are correct, but that is what I am saying, there are function in the OpenGL library where I said: "what does this actually do?" And I look up the functions, develop and understanding, and then put it down.
🐰🐾 سمیه
but don't be repetitive
ok. it's the last question about getch. 😊
Ariana
Suggestion: play with the function in a smaller program
Ariana
like char a=getch(); printf(“%c”,a);
Ariana
oh oops
klimi
np
🐰🐾 سمیه
Ariana
So you know how to use the function and what it does more clearly
Mihail
what's the doffrence?
You'd understand what it actually does
🐰🐾 سمیه
I completely fortgot the question😒
🐰🐾 سمیه
and think what the function does
I think c still contains the first char and assigns it to S[0]. So the first assignment doesn begin from getch() in line 2, actually it begins from C. correct?
BinaryByter
well you need to look at what the function does
BinaryByter
it does "getop"
BinaryByter
it gets the first operator in a string
BinaryByter
so it scans the string until it sees an operator
BinaryByter
But where is the problem if it only assigns a char to s[0]?
BinaryByter
its completely valid code
Daniel
Hi guys. i haven't included any file, but std functions work. Even swap from <move.h>. Why? https://github.com/RXDYE/oopLab3
klimi
Hi guys. i haven't included any file, but std functions work. Even swap from <move.h>. Why? https://github.com/RXDYE/oopLab3
and what is this // // Created by rxdye on 3/28/19. // #include <iostream> #include <cstring>
Daniel
but what is about move.h?
olli
but what is about move.h?
There is no move.h
Daniel
so why does swap work?
Daniel
I use gcc
Francisco
so why does swap work?
It may be included from one of your headers
olli
I use gcc
Is utility included? (Probably not by you but by some other headers)
Francisco
iostream probably includes string, which includes swap for sure
klimi
only headers included are iostream and cstring