@drone
How to learn c and c++
Beyond
probably watching some courses or tutorials? while you try to understand them you can do some projects to improve your skills in it
Anonymous
How to learn c and c++
Practice practice practice... It will be very hard to learn much without setting aside lots and lots of time and do reading + coding + code review + other skills. If you have a family to look after it might be too difficult for some...
Anonymous
Practice practice practice... It will be very hard to learn much without setting aside lots and lots of time and do reading + coding + code review + other skills. If you have a family to look after it might be too difficult for some...
It is possible to learn mostly on your own, reading books and such, but you should take a class! Find a mentor and/or peers also learning at least, take a class... That would be much much easier than getting stuck on every little thing.
1212
..
Anonymous
What’s the best YouTube channel to learn
Jas
It is possible to learn mostly on your own, reading books and such, but you should take a class! Find a mentor and/or peers also learning at least, take a class... That would be much much easier than getting stuck on every little thing.
Agreed. Visual Studio's new integrated screen sharing features are really enjoyable as a way to work through new concepts as you learn the language. Obv plenty of other solutions for that sorta thing, but useful in pandemic days.
Jas
Okay.
Anonymous
Anonymous
Anonymous
Except probably this one https://youtube.com/c/TheChernoProject
^^^
CodeBlocks is not beautiful in any way
for me it is I learned c/c++ through this ide and have good experience
Anonymous
for me it is I learned c/c++ through this ide and have good experience
You can't "learned" C++ C++ is a huge language that you never stop to learn C/C++ is not a thing. C and C++ are so much different languages that cannot be combined this way.
Anonymous
And I fill bad for you that you stick with CodeBlocks because there are a lot of better IDEs than CodeBlocks
^^^
You can't "learned" C++ C++ is a huge language that you never stop to learn C/C++ is not a thing. C and C++ are so much different languages that cannot be combined this way.
I never said I stopped to learn but meant we learned through codeblocks at uni c and c++ in the past :) yeah sure I am familiar with other ide's too
^^^
And I fill bad for you that you stick with CodeBlocks because there are a lot of better IDEs than CodeBlocks
excuse me but what is for me better must not be better for you and the other way around. there are people who work better with vs others with eclipse etc
Jas
I've tried a bunch of IDEs. They're like DAWs in the audio world. They're all extremely good these days so The best one is whatever lets you produce code efficiently and comfortably. Super personal choice.
Anonymous
#ides
Anonymous
Even VSCode or Vim with a little bit of spent time to configure them give better ide experience than these ones
Jas
Visual Studio is excellent, thank you very much. Granted if I didn't have a powerful machine I'd probably say otherwise.
^^^
No.. it's just a fact :) Eclipse is bad either
lol no it is opinion eclipse is my nr 1 til now IDE but clion seems to be powerfull too but only free for 30 days testing I guess
Anonymous
lol no it is opinion eclipse is my nr 1 til now IDE but clion seems to be powerfull too but only free for 30 days testing I guess
No 1. You can get a student license 2. You can use EAP versions which are free even for commercial use 3. If you report decent amout of bugs for EAP versions, JetBrains can give you 1 year license
Jas
It's a lil bulky. Otherwise it's fine. Seriously most modern IDEs are either slightly different Electron based products like VSCode/Atom/Eclipse or a big heavy dev tool like VS2019
Jas
Try out the options, use whichever one you are most productive in. 😎
Dhanny
Hi
Dhanny
Am I welcome here
Anonymous
Someone plz help me in writing a program that uses two functions to calculate &return the volume and the surface area of acylinder
Jas
Eclipse has nothing to do with electron. It existed long before there was such thing
You're correct. That sentence should have said Theia not eclipse. My bad.
Jas
Pretty sure Theia is Electron based
Bumpy
Where can I find examples of Arrays 2D 3D and string questions with solutions?
Bumpy
except GFG
many
Coroutine is introduced in c++20. Do we still need libraries like libuv nowadays? Also does the C++ coroutine have the same concept as the Python one and Go one?
M
Hello did anyone try to use dns in Xcode ? Can we get ip through there and work with that ip ?
Anonymous
gcc 9.2.0 g++ 9.2.0 Please help me. Some of my friends are getting no errors whereas I'm getting error in declaring an array with variable no. of elements for eg cin>>n; int arr[n];
Anonymous
My error reads: expression must have a constant value --the value of "n" (declared at line 4) cannot be used as a constant Whereas some of my friends using same version of gcc/g++ are getting no errors
Anonymous
and in C?
AHMED
#include<iostream> using namespace std; class myClass{ public: int x , y; myClass(){ x = 5; y =6; } myClass(const myClass& other){ cout<<"copy constructor called\n"; } }; int main (){ myClass myObj1; myClass myObj2 (myObj1); cout<< myObj1.x<<"\n"<<myObj2.y<<"\n"; return 0; }
AHMED
Why the output of myObj2.y is 0 not 6?
AHMED
Why would it be 6?
Because myObj2 is created using the copy constructor, so data in myObj1 should have been copied to myObj2
AHMED
Anonymous
How to make it copy everything?
myClass(const myClass&) = default;
AHMED
x = other.x
Yes . Thank u
AHMED
It worked this way:
AHMED
#include <iostream> using namespace std; class myClass { public: int x,y; myClass() { x=5; y=6; } myClass(const myClass &other) { x= other.x; y= other.y; } }; int main() { myClass myObj1; myClass myObj2(myObj1); cout<<myObj2.x<<"\n"<<myObj2.y<<"\n"; myObj1.x=1; myObj1.y=2; cout<<myObj2.x<<"\n"<<myObj2.y<<"\n"; return 0; }
AHMED
myClass(const myClass&) = default;
Thanks It worked this way too.
AHMED
#include <iostream> using namespace std; class myClass { public: int x,y; myClass() { x=5; y=6; } myClass(const myClass&) = default; }; int main() { myClass myObj1; myClass myObj2(myObj1); cout<<myObj2.x<<"\n"<<myObj2.y<<"\n"; myObj1.x=1; myObj1.y=2; cout<<myObj2.x<<"\n"<<myObj2.y<<"\n"; return 0; }
MRT
I think this user should read the book :D
AHMED
I think this user should read the book :D
Are you joking me? Thanks for your politeness
AHMED
Your way to invite me wasn't good. You didn't invite me directly. You said 'this' user .
AHMED
Ok .
AHMED
Which book should I read ?
MRT
Which book should I read ?
I have done research and I am reading this book, maybe it is a better case that I do not know https://www.informit.com/store/c-plus-plus-primer-9780321714114
MRT
Which book should I read ?
https://raw.githubusercontent.com/yanshengjia/cpp-playground/master/cpp-primer/resource/C%2B%2B%20Primer%20(5th%20Edition).pdf
Anonymous
Who knows good roadmaps for learning C++ from zero?
Bumpy
void buildMatrix(int n , int m) { int Matrix[] = (int*)calloc(n * m,sizeof(int)); for (int i = 0; i < n*m ; i ++) { scanf ("%d",&Matrix[i]); } printMatrix(Matrix,n,m); } void printMatrix(int *Matrix, int n , int m) { for (int i = 0; i < n ; i ++) { for(int j = 0; j < m; j ++) { printf("%d ",Matrix[i + j]); } printf("\n"); } printf("%p",Matrix); free(Matrix);
Hanz
Wait, i havent read them lol
Hanz
Which is better to learn first? C or C++? I've been diving deep into programming but still cant undrstand these main low programming languages
Vlad
Use STL to it's fullest since day one
Hanz
Vlad
Ok, i will learn about that
For example use vector instead of raw arrays and T*. Algorithms and what not
Bumpy
void buildMatrix(int n , int m) { int *Matrix = (int*)calloc(n * m,sizeof(int)); for (int i = 0; i < n*m ; i ++) { scanf ("%d",&Matrix[i]); } printMatrix(Matrix,n,m); }