Till
Yes, I tried searching
=) over 3k usages in linux kerner
Anonymous
Beside code quality, what decisions in Linux kernel are ugly?
Anonymous
There are parts quite elaborate
Till
And some parts of code may rewritten on C++, but Linus don't want, because he doesn't know C++.
Anonymous
They tried c++ earlier as drew Eckhart said on quora
Till
It is not possible to write a stable kernel in C++
It's possible write some parts of code
Nameful
Why would C++ prevent you from writing a stable kernel?
Anonymous
Why would C++ prevent you from writing a stable kernel?
when you write a Kernel, you need to know what are you doing, exactly. Only C provide you such confidence.
Anonymous
What features of C++ would not give you enough control?
for example you write in a file: a + b that simple code in a file might erase everything in disk, because of operator overloading
Nameful
Lol, what? On C you can't write a safe type
But you can't redefine what + does as far as I'm concerned
Anonymous
But you can't redefine what + does as far as I'm concerned
The point is that C++ do so many things implicitly, so you can't be sure of what are you doing, until you carefully read the whole project. But in C, you can safely write a single C source file, wich include only few header files
Chernykh
It's wrong big C projects is less readable then cpp projects
Chernykh
For example, when I looked through Google chrome code, there were an arrays of pointers to function and that very implicitly, because u don't sure what will be contained there and what will be called. Moreover it's not securely
Chernykh
Also it isn't readable
Chernykh
int sum(int a, int b); int subtract(int a, int b); int mul(int a, int b); int div(int a, int b); int( * p[4])(int x, int y); int main(void) { int result; int i, j, op; p[0] = sum; /* address of sum() */ p[1] = subtract; /* address of subtract() */ p[2] = mul; /* address of mul() */ p[3] = div; /* address of div() */
Ajay
Define compile-time polymorphism
compiler identifies which polymorphic form it has to execute at compile time. But, we implement compile time poly. by function overloading. Why isn't the other way true?
Richie
https://www.codechef.com/FEB20B/problems/THEATRE
Richie
Can anyone solve this problem..?
klimi
yep
klimi
anyone can solve that
Richie
Solve this problem
Richie
I req u guys..?
Dima
Solve this problem
/warn read the rules
Dima
Retards
MilkBeforeCereal
abuse me 😩
klimi
abuse me 😩
come pm *wink*
MilkBeforeCereal
Ajay
I don't understand what you mean
One way of achieving compile time polymorphism is by function overloading. But, why doesn't the mentioned code follows compile-time poly?
kapil
Hi, i have to create a project for bca 3rd year. i was thinking of creating a simple project. something related to web scrapping. project needs to be either in C++ or java. i am familiar with dart and javascript. i can make a project in dart, javascript or most android app clone in flutter with ease. but since its a distance education i didn't get much time to study C++ or java. i was told that C++ will be better option for me as i am already familiar with dart and javascript. any recommendation for me? i have done web scrapping in java, simple stuff as well. (once) i am trying to find youtube videos on how to create simple windows GUI app in C++ and also web scrapping using C++. but i can't find anything good. all i need is one good video on both topics. rest i can follow very quickly. so if anyone has link to some channel or link to a video which covers any of these two topic, then please let me know. i don't want exact project video, just something related to this , covering these two topics. thank you for your time
klimi
qt for gui is cool
kapil
qt for gui is cool
what about webscrapping using C++? is it a good idea? i can't find any detailed or good video on this topic(only handful videos on this). i will just be checking for one value. price, thats it. nothing else. want to make as simple project as possible. so that i can understand everything and i am able to answer everything from my project as well.
Asdew
H1n1, are you the H1N1 influenza virus?
David🇨🇺ElChino
Asdew
Coronavirus?🤔🤣
Coronaviruses are not H1N1.
David🇨🇺ElChino
Coronaviruses are not H1N1.
I know... Just kidding
Kenny
Hey guys, how could i split into tokens a string? Example: "hello fine sun" Output: Hello Fine Sun
klimi
// string A, B, C. std::cin » A » B » C;
Kenny
No, I must introduce an string of n size and then split
Kakashi Hatake
Is it possible to create a mail client using c only?
klimi
std::string text = "Let me split this into words"; std::istringstream iss(text); std::vector<std::string> results(std::istream_iterator<std::string>{iss}, std::istream_iterator<std::string>());
Nameful
why not
was there not a k in your name?
klimi
there was
Dima
so what?
Nameful
so what?
I was uncertain whether my memory was failing me or not
Igor🇺🇦
Anonymous
hi guys
Anonymous
any idea ?
Dima
any idea ?
I thought this is a laptop and external display photo lol
Dima
did it actually read the file?
Anonymous
Anonymous
help me solve my problem plz
Anonymous
after that I'll give you my dotfiles xD
Dima
try to debug it
Dima
what fp actually returns
Anonymous
what fp actually returns
if files exist return file created and if file didn't exist i got this
Dima
try to add a condition
Dima
if (fp) fclose(fp);
Dima
no
Dima
read my message again
Anonymous
i don't want use if and else
Dima
your fault then
Anonymous
if u can't help me just quiet