Message from C, C++ talks

June 2019

— Unless I've done so much Python that I forget C++ rules.

— > I've heard a lot about that is better to use old C90 standard. Correct me if I'm wrong.
well you're very very very wrong. yes there are these people who find it cool to hate on new features, but you'll just have to learn to ignore those. also if you're looking for anything game related C++ will likely be better (and for most things C++ would be better, so idk why you want to learn C, which is better than C++ only is select few cases). and for ide just use whatever suits you, CLion will work, so will vim (but some plug-ins would be handy)

Message permanent page

— Yeah, I want to learn C. Then I realize how quickly something could go wrong with code that doesn't look problematic. It's not such a safe language, unless you learn from your mistakes and don't repeat them. If you can get through C, you can probably make it through most other things, right?

Message permanent page

— Yes


Well, languages are different, they use different concepts on the level of the language (classes, functional objects, coroutines, lazy evaluation). You can use some of such concepts in C as well, but it would be much harder as you need to implement them and be consistent, because there's no compiler to help you with this (because it cares only about C syntax).

Usually, if you know C well, but know only C.. then you know only C.

— Can anyone help me to remove this error "runtime error: member access within null pointer of type 'struct ListNode'"

Message permanent page

— I think the error message is very specific, but without code snippet, we can't help

— Can i pm?

— Or should i paste code here

— Pastebin if it's long

— 32 lines

— BTW, they fixed this in C++17?

— '''class Solution {
ListNode* reverseBetween(ListNode* head, int m, int n) {
ListNode *cur=head,*prev=head,*pre=head,*post=head;

for(int i=0;i<m-2;i++)

for(int i=m;i<n;i++)
{ if(post!=NULL)

for(int i=m;i<n;i++)

return head;

} };'''

Message permanent page

— C++ 17.... Means..?

— Line 20: Char 4: runtime error: member access within null pointer of type 'struct ListNode' (solution.cpp)

Message permanent page