Anonymous
It's a fact that C has less overhead than C++
It depends on your code and compiler, but generally speaking I think yes. + This coast makes the coding time less.
Anonymous
That's not true
I'll keep referring to one example Jason Turner wanted to rewrite Doom to C++. It was a huge task and the only thing he did is fixing compiler errors for C++ compiler and that lead to 10% increase in performance
Victor D.
Well, i wouldn't recommend you writing a billing system in C. Although it is possible
olli
Sorry, noisy in here, please tell me the problem again
From here FFFFFFxxxxTTTTTTTxxxxFFFFTTTT999 you read 31 characters into the array, so there's only one 9 left, and hence num is 9. The last two items of the array are 9 as well. when printing num, try adding a new a space before and after and see how there will be no 999
Anonymous
Can you explain why?
C++ has more features to make compile-time computations and thankfully for that C++ compilers have more information to make optimizations with
Anonymous
C++ has more features to make compile-time computations and thankfully for that C++ compilers have more information to make optimizations with
Even though if you need exact same performance as C or better, you need to exclude exceptions and RTTI fftom the code
Anonymous
And virtual methods
They are zero-cost
Anonymous
If you need runtime polymorphism in C, you need to implement virtual table :)
Victor D.
Game development folks satanize virtual methods. They tried to avoid whenever they can.
olli
I have a question on this. He could get a 10% increase over C?
I don't think he has actually done a benchmark on it.
Anonymous
Just use vim. https://code-vault.net/lesson/4wy66ezt7u:1610303902122 https://www.youtube.com/watch?v=9pjBseGfEPU
Anonymous
I don't think he has actually done a benchmark on it.
He had, there were a benchmark, he showed it running
Anonymous
olli
Yep
are you referring to fps counter?
Anonymous
Or maybe there was a separate video about it
olli
I would not consider this a benchmark as he mentioned himself.
Anonymous
are you referring to fps counter?
That's I'm not aware of, I can't recall
olli
If I am not mistaken he used a VM to execute it, and the setup changed so I would not rely on these numbers.
Anonymous
I think there was a recorded play and he compared time c and cpp version ran it I hope you understand what I mean, I'm not good at English right now
Nils
C is very very unlimited, but does not bring much functionalility on its own, like classes. C++ has classes and templating and stuff and is still as unlimited as C
Nils
You can litterally insert assembly code 😉
Alex
It's a fact that C has less overhead than C++
not always. for example compare template sort with C sort style
Ishank
Best app for coding C++ or C
MᏫᎻᎯᎷᎷᎬᎠ
Best app for coding C++ or C
Qt creator If you are a beginner go for code blocks
Ishank
How is C4droid for coding in phone ?
Nomid Íkorni-Sciurus
How is C4droid for coding in phone ?
why would you code in phone in the first place
Nomid Íkorni-Sciurus
Anonymous
How is C4droid for coding in phone ?
C4droid starts out with TinyCC + dietlibc, or something like that... It can be upgraded to GCC or clang I think.
MᏫᎻᎯᎷᎷᎬᎠ
why would you code in phone in the first place
I used Papers when I learned C++ the first time
Nomid Íkorni-Sciurus
MᏫᎻᎯᎷᎷᎬᎠ
Nomid Íkorni-Sciurus
Nope Why?
because code::blocks is a fossil
Ishank
C4droid starts out with TinyCC + dietlibc, or something like that... It can be upgraded to GCC or clang I think.
I have my laptop but mING W compilor isn't working Thatswhy and I tried many time it isn't fixing
Anonymous
It has a mini IDE of sorts, which may or may not be awkward... It has a terminal builtin but isn't as exte sive as Termux.
MᏫᎻᎯᎷᎷᎬᎠ
C4Droid is nice if you just want to test something quick when you are away from your pc
Nomid Íkorni-Sciurus
MᏫᎻᎯᎷᎷᎬᎠ
because code::blocks is a fossil
Someone with the intention of learning C++ doesn't want to concern him/herself with a lot of nuances like, they just want to learn the language
Ishank
Ishank
Guys , please suggest me a application other than VS code for coding C/c++
Nomid Íkorni-Sciurus
Someone with the intention of learning C++ doesn't want to concern him/herself with a lot of nuances like, they just want to learn the language
Someone with the intention of learning C++ also doesn't want an unintuitive and completely obsolete, uncustomizable, non-modern and just old software I mean Nobody uses DevC++ Why would anybody use Code::Blocks today?
Nomid Íkorni-Sciurus
The only thing code::blocks did right was GCC integration, which is actually not bad
MᏫᎻᎯᎷᎷᎬᎠ
Why would I customize the UI if that what you are saking?
Nomid Íkorni-Sciurus
Why would I customize the UI if that what you are saking?
it's an example in a subjective way, I wouldn't code anywhere a dark theme is not available 😆 In a more general way, I wouldn't code with an old software if better options are available.
Nomid Íkorni-Sciurus
Since it's subjective preferences...
about UI yes, it is subjective but now, Code::Blocks worths the same as DevC++ does.
Nomid Íkorni-Sciurus
although, I'll admit C::B does have some nice features wxdesigner and some other useful utilities (gdb tools and other plugins as well) but there are better options to this date.
MᏫᎻᎯᎷᎷᎬᎠ
Come on C++ newbies just want to see the language
MᏫᎻᎯᎷᎷᎬᎠ
and get some basic explore
Nomid Íkorni-Sciurus
MᏫᎻᎯᎷᎷᎬᎠ
C++ isn't for newbies
My first introduction to CS/programming world was with C++
Nomid Íkorni-Sciurus
Nomid Íkorni-Sciurus
ahhaha
MᏫᎻᎯᎷᎷᎬᎠ
The point is That over-complex language, yeah I agree But just basic things(function, classes...etc) is just fine
MᏫᎻᎯᎷᎷᎬᎠ
I'm sorry for you
I would do it again xD
Anonymous
My favorite technique is the parametric method, it works for both horizontal and vertical lines. void line(int x1, y1, x2, y2) { int steps = max(abs(x2-x1), abs(y2-y1)); if(steps == 0) { plot(x1, y1); return; } for(int i = 0; i <= steps; i++) { float t = (float)i / (float)steps; int x = round((1.0-t)*x1 + t*x2); int y = round((1.0-t)*y1 + t*y2); plot(x, y); } } This is a little slower than other techniques but easy to code.
MᏫᎻᎯᎷᎷᎬᎠ
The point is That over-complex language, yeah I agree But just basic things(function, classes...etc) is just fine
+ I can see the standard is towarding itself to a simple language Even there are some proposals for this although it got rejected but it may come to see the light again like Epochs
Nomid Íkorni-Sciurus
The point is That over-complex language, yeah I agree But just basic things(function, classes...etc) is just fine
yeah, obviously I'm talking about the more complex features of C++ but really, it's just too old now, and many of its features are just ridiculous nowadays
MᏫᎻᎯᎷᎷᎬᎠ
yeah, obviously I'm talking about the more complex features of C++ but really, it's just too old now, and many of its features are just ridiculous nowadays
Literally everyone is newbie to C++, whether an expert java developer or someone heard about programming before The first knowledge will get him only so far
MᏫᎻᎯᎷᎷᎬᎠ
But at some level they are both the same
Nomid Íkorni-Sciurus
But at some level they are both the same
Ehr... no, I don't think so
MᏫᎻᎯᎷᎷᎬᎠ
Ehr... no, I don't think so
Really? Tell me about someone moving from Pythone/js to C++
MᏫᎻᎯᎷᎷᎬᎠ
Ah, you meant that
Java has some OOP concepts, but not as complex as C++ virtual method/destructors, virtual/multiple inheritance, recursive inheritance...etc
MᏫᎻᎯᎷᎷᎬᎠ
Template programming is just another dimension