Anonymous
Am from nigeria
Anonymous
And am new in programming language
Anonymous
Which language do u suggest I should start with
Crush_my_love
Stop teaching C
Crush_my_love
If he needs C++. Then it's better to start with C++. If he needs C then learn C.
Crush_my_love
https://m.youtube.com/watch?v=YnWhqhNdYyk
Beyond
also more companies needs developers who can code with c++ or java. c is actually kinda rare on business side tho
Diego
Though personally I'll always recommend C# above all
Crush_my_love
Well, then its better to start with Java or C# in my opinion
Diego
Everything you can do in C you can do in C++, it's easier to use new and delete than malloc() and free()
Crush_my_love
Everything you can do in C you can do in C++, it's easier to use new and delete than malloc() and free()
And at the beggining you have high level containers which is easy to use and fun, and later he can dive deeper if he wants to
Diego
Well, then its better to start with Java or C# in my opinion
If it's programming in general, I'll undisputably recommend starting out with Lua or Python and building your way up, scripting languages are good as long as you don't get stuck on them But he's asking between C and C++, in which case, I'll recommend C++
Diego
Nah. Python suck as a first language. Strong and static typing matters
It does, it makes everything unbeliveably easier, but hardly any language nowadays combines procedural programming with such a nice easy to read syntax
Diego
F# is a good example of this, the syntax is weird to me
Crush_my_love
I remember i started learn javascript as first one bc some of big brain reccomened me to start with it. It was confusing tbh
Beyond
Nah. Python suck as a first language. Strong and static typing matters
but python is pretty simple and it gives you the chance to learn the 'basics' which is also included in other programming languages like variables if/else conditions etc...
Diego
I think Lua is a lot cleaner looking than Python, even it if it still doesn't have curly braces
Diego
But F#'s weird with the |> things
Crush_my_love
but python is pretty simple and it gives you the chance to learn the 'basics' which is also included in other programming languages like variables if/else conditions etc...
Idk man. Maybe you're right, but later it will be harder to learn any different c-like language if he will start from python
Diego
Idk man. Maybe you're right, but later it will be harder to learn any different c-like language if he will start from python
Not necessarily Programming takes time on its own It's easier to build a foundation on such languages, but you will eventually have to get well outside the comfort zone you've built
Diego
I think the trade off of using a scripting language to start out is fair
Beyond
well python is also a script language which is way simpler than oop languages like c++
Crush_my_love
Maybe. But if i will back in time to suggest what first language to learn, i will suggest myself Java tbh.
Diego
If I could go back in time I'd stay and be a proper teacher to myself
Diego
Programming is hell when you don't know where to go
Diego
It's still my first love, right next to Electronics though
Amirali
Hi guys I have an off-topic question but its related to C/C++ can I ask here?
Amirali
I learned DS in java (basic DS like linked-list, hash table....) in school I want to try them in C/C++ I see so many Lynda Udemy Youtube, ... videos...(but they are just teaching the concept ... I don't really understand them!) is there anywhere I can learn these data structures in C/C++ by doing the projects? Thanks in advance
Droningbro
Can anyone help me with a infinite loop from 1 till infinity using for loop
Anonymous
Can anyone help me with a infinite loop from 1 till infinity using for loop
#include <iostream> using namespace std; int main() { int i=1; while(i!=0) { cout<<i<<endl; i++; } return 0; }
Droningbro
#includs<iostream> Using namespace std; Int main() { Int I=0; While(true) { Cout<<i<<endl; } Return 0; }
WHITE
Can anyone help me with a infinite loop from 1 till infinity using for loop
For(;;) cout << 'hello' << endl;
Loyalty Haitaki
https://t.co/Trnywr3ZH1 nobody has ever been able to break this code try if you can
Loyalty Haitaki
/report
Wtf😂😂😂
Loyalty Haitaki
/report
What's wrong with you?
Loyalty Haitaki
/report
/report
Roxifλsz 🇱🇹
Bruh
Anunay
Roxi with the ban hammer
Roxifλsz 🇱🇹
Anunay
Loyalty Haitaki
srand() good bye
Roxifλsz 🇱🇹
Bye bye
Loyalty Haitaki
I will find you
Roxifλsz 🇱🇹
I will find you
/ban seethe more
Ammar
/report
Roxifλsz 🇱🇹
/ban 2bussiness4me
Roxifλsz 🇱🇹
/report
Thank you, fellow weeb
Sasuke
While overloading the operator+= why do we need to return the reference to the object? I have done something like this. x += 1; In the overloading function body the value of x does increments by 1 and note here I didn't use reference here so I returned a copy of x. But in the main when I print x its not incremented at all. Why? When I use reference instead of copy it does work fine. Someone please explain this behaviour
Sasuke
While overloading the operator+= why do we need to return the reference to the object? I have done something like this. x += 1; In the overloading function body the value of x does increments by 1 and note here I didn't use reference here so I returned a copy of x. But in the main when I print x its not incremented at all. Why? When I use reference instead of copy it does work fine. Someone please explain this behaviour
Ok nvm I figured it out It's not like as it seems I thought x+=1 is equivalent to x=x+1 so I could return a copy and it will eventually change the value of x but it's not the case. To make that true I have to call something like that x= x+=1; So wow today I learnt x+=1 is not equal to x = x+1; 🙃 It was a lie.
Anonymous
No, it's not
klimi
Thank you, fellow weeb
His PFP is so nice :3
Anonymous
No, it's not
If you haven't changed your programming habits when switching from C to C++, probably your C++ code is not good
Sasuke
If you haven't changed your programming habits when switching from C to C++, probably your C++ code is not good
I am learning c++ coming from C backround. Which habits are you talking about? Till now I learnt I don't have to mess with pointers to get my work done its too easy with help of STL. Anything else?
Fordring♿️
Sasuke
Read C++ Core Guidelines
Available on cppreference?
Anonymous
Available on cppreference?
Available as first link in google
Xudoyberdi
Stack over flow.
MRT
char* myCharList[5];
MRT
char* myCharList[5];
how i can initializ this pointer ?
Anonymous
Anonymous
It's an array
MRT
list o poiner
MRT
It's an array
array of pointer ?
Vlad
array of pointer ?
array of pointers
MRT
array of pointers
👍, how i can add pointer to this array ?
Andrew
what do you mean_