Anonymous
Thank you so much 🌹
Anonymous
You are great guys
Thanks so much
V01D
How come?
V01D
Okay
Indolent
SPOILER ALERT
Can't believe in this movie Jarhead the protagonist didn't fired a single shot till the fucking end
Renan
Parra
Dima
even the language creator doesn’t know it at all
Mar!o
Parra
أسامة
أسامة
one need projects to work on more than books to read
Parra
Parra
I haven't read a book in 8-10 years or so
أسامة
programming is about implementing not about bookworming
أسامة
BTW, i am reading now a program source🧐
Vlad
Parra
the last book I read was this: https://www.amazon.com/Game-Engine-Architecture-Jason-Gregory/dp/1568814135
Konstantin
programming is about implementing not about bookworming
it depends on what you call "programming".
if it is simple coding, then you could be right, but it is very boring life.
if it is "software engineering", then "bookworming" is part of the job.
أسامة
even with software engineering
you need something rather than books, nobody can make somebody learn engineering using a just a book case
you need reading, but not from books. you need books only on the beginning
Parra
that depends on how you like to learn
Parra
I like to learn by example, doing projects and reading code of big open source projects
أسامة
i am studying source code of a game called "0ad", but not sure yet of its benfits
Parra
I am software engineer but the only thing I got from University is good contacts and learning the common jargon in order to communicate with other engineers
Parra
Parra
and now I'm writing a muti-runtime polyglot which is being used in a FaaS that I'm also developing
Parra
I haven't read a single book about how to build a FaaS
Parra
experimentation is the best teacher
Dima
Rashu
(std::cin) what is this meaning?
Rashu
std::cin
Rashu
What is this meaning?
E
enter a litral
Sai
WAP to read the name of 10 student from keyboard and display them using string in c programming?
I_Interface
Dima
I_Interface
Roxifλsz 🇱🇹
So rude.
He's not wrong tho
Anonymous
std::cout « "Hello" « std::endl;
V01D
Why does everybody use std::endl all the time?
The console gets flushed twice, which makes std::endl useless in most cases
Alex
Asuna 🍓
endl will flush console buffer afaik
Alex
V01D
Pretty sure I heard someone say it does.
Alex
could you provide a link?
V01D
Sadly no.
It was some youtube video
Anonymous
I think it may depends on which complier you are using.
Asuna 🍓
Inserts a newline character into the output sequence os and flushes it as if by calling os.put(os.widen('\n')) followed by os.flush().
With \n instead of endl, the output would be the same, but may not appear in real time.
ref from
https://en.cppreference.com/w/cpp/io/manip/endl
V01D
g++
Asuna 🍓
So consider that you are debugging a crash bug with cout, without endl you may not get the exact last output.
olli
endl flushes, see [ostream.manip-2]. cout is only an object of type ostream [iostream.syn]. Looking at [ostream.formatted] there is no guarantee that it flushes for operator <<.
[ostream.manip-2] http://eel.is/c++draft/input.output#ostream.manip-2
[iostream.syn] http://eel.is/c++draft/input.output#iostream.syn
[ostream.formatted] http://eel.is/c++draft/ostream.formatted
V01D
So which is better in terms of efficiancy, and memory managment?
Alex
olli
Asuna 🍓
V01D
Okay, but non debugging wise.
What is the best way / fastest?
Asuna 🍓
Asuna 🍓
ID for other languages is not allowed?
The pinned msg doesn't seem to say that.
Sai
Is it fine to write “void main()” or “main()” in C/C++?
Zel
Also the value it returns can help with debugging.
V01D
Zel
There is no reason not to use endl any time you are done sending text to the console.
Zel
Now using it for every line ending can get expensive.
V01D
Now using it for every line ending can get expensive.
Got it.
So from my understanding:
I can have three cout calls, and only the last would really need an endl, like so:
... print(msg) {
cout << "Msg is:\n";
cout << "DummyText...\n";
cout << msg << endl;
//function end
}
Muhammad Saad
Hey, I just started learning c++ and my professor gave me an assignment.
I want the user to enter any character. Then I have to check weather it's Upper case alphabet or lower.
Kindly help me.
Alex
Alex
Zel