Jump to content

Tips for learning c++

Archetype117

Hi.

 

Just wondered if anyone has any tips for learning C++ or any programing in general. I want to learn it but just don't know where to start

Link to comment
Share on other sites

Link to post
Share on other sites

NEW PC build: Blank Heaven   minimalist white and black PC     Old S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Ryzen 3950X | AMD Vega Frontier Edition | ASUS X570 Pro WS | Corsair Vengeance LPX 64GB | NZXT H500 | Seasonic Prime Fanless TX-700 | Custom loop | Coolermaster SK630 White | Logitech MX Master 2S | Samsung 980 Pro 1TB + 970 Pro 512GB | Samsung 58" 4k TV | Scarlett 2i4 | 2x AT2020

 

Link to comment
Share on other sites

Link to post
Share on other sites

Also What I would suggest for everyone in every programming language is, except for gathering resources and reading as much as you can, try to build something yourself. And by this I don't mean follow a tutorial. Get an idea for something fun to do. Start as simple as possible and to that. You will learn problem solving which is necessary in programming and when you are done after facing adversities, you will feel a great gratification. So find something fun to do, draw your inspiration online maybe and get programming :P

 

Edit: grammar

Edited by Ifree2pay
main(){
  extrn a,b,c;
  putchar(a); putchar(b); putchar(c); putchar('!*n');
  }

a 'hell';
b 'o, w';
c 'orld';

 

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Ifree2pay said:

Also What I would suggest for everyone in every programming language is, except for gathering resources and reading as much as you can, try to build something yourself. And by this I don't mind follow a tutorial. Get an idea for something fun to do. Start as simple as possible and to that. You will learn problem solving which is necessary in programming and when you are done after facing adversities, you will feel a great gratification. So find something fun to do, draw your inspiration online maybe and get programming :P

That's why I want to learn programing. You can literally make anything if you work with it hard enough

Link to comment
Share on other sites

Link to post
Share on other sites

I learned most languages by looking at other people's code and trying to make something with it.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

Here you go! http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list

 

my advice ? Don't overblow c++ and pointers too much, as long as you pratice simple examples and see what it is, you'll understand basic pointers in a matter of days.

Keep practicing, and know there's really no right way to do things. C++ has a lot of freedom on how one might go about things. It falls more on your own style. It is my first language I learned , and I liked it very much. Don't forget to make mini projects for the skills you learn. You need tiny programs and useful algorithms to test out your new skills. Also don't be afraid to spend more than half your time investigating references rather than trying to wing it. Don't make functions too big. Keep them small and with a clear task. (don't make functions for every little thing as well). Don't forget to indent your code and write in a way that makes it easier for you to read it.  have fun :)

Link to comment
Share on other sites

Link to post
Share on other sites

Don't start with C++, start with Python it's a much better language for beginners and those who are just learning Python can do much more than C++ beginners. You can use Python to write a GUI way easier than C++, with Python you can interact with the real world using the Raspberry pi and so much more. It's much easier because it isn't nearly as strict of a OO language like C++. After you've learned Python jumping into C++ will be a breeze. 

 

https://www.codecademy.com/learn/python

Link to comment
Share on other sites

Link to post
Share on other sites

I would highly recommend "Absolute C++" as a reference. I was using that to learn at my other college, and it was soooo informative and to the point. 

 

Full PDF versions are easily found online in google searches, however it may be considered Piracy so I cannot recommend you do so. It can be very cheap to purchase, and I prefer the physical copies. 

 

In addition the projects at the end of each chapter are very smart and tie into the lesson very well building upon the previous lessons. 

Link to comment
Share on other sites

Link to post
Share on other sites

Also, dive deep into Qt - it's full of classes, inheritance, overloading, etc. filled to the brim with OOP features (as you know C++ is better than C mainly because of OOP).

 

Also as a bonus - you get to work with the best, super-robust, cross-platform (even embedded systems) frame-work for application development, especially for GUI. I've just started working with Qt, and am very happy about my decision...

Nothing to see here ;)

Link to comment
Share on other sites

Link to post
Share on other sites

26 minutes ago, Anand_Geforce said:

Also, dive deep into Qt - it's full of classes, inheritance, overloading, etc. filled to the brim with OOP features (as you know C++ is better than C mainly because of OOP).

 

Also as a bonus - you get to work with the best, super-robust, cross-platform (even embedded systems) frame-work for application development, especially for GUI. I've just started working with Qt, and am very happy about my decision...

Is Qt paying you to say this?

 

In my experience with PyQt Im not convinced at all.

I also messed with it in C++ and I hate how it mutalates the developer environment.

A good framework would not require a IDE plugin to be used.

Furthermore, Qt designer is absolutely awfull compared to Android Studio's or Visual Studio's (UWP apps) visual designers.

Support is also bad by deprecating things they have just introduced un the last version.

Try writing an OpenGL application with Qt, its a mess with the everchanging Qt API . And even worse: Qt leaking OpenGL state.

 

To give users an optimal experience you need to adapt to the platform they're running.

With Qt you're making something that feels out of place on most platforms.

This is why I absolutely hate web apps (apps that are actually websites, like PhoneGap junk).

Desktop: Intel i9-10850K (R9 3900X died 😢 )| MSI Z490 Tomahawk | RTX 2080 (borrowed from work) - MSI GTX 1080 | 64GB 3600MHz CL16 memory | Corsair H100i (NF-F12 fans) | Samsung 970 EVO 512GB | Intel 665p 2TB | Samsung 830 256GB| 3TB HDD | Corsair 450D | Corsair RM550x | MG279Q

Laptop: Surface Pro 7 (i5, 16GB RAM, 256GB SSD)

Console: PlayStation 4 Pro

Link to comment
Share on other sites

Link to post
Share on other sites

  • 3 weeks later...
On 9/9/2016 at 6:48 PM, mathijs727 said:

Is Qt paying you to say this?

 

In my experience with PyQt Im not convinced at all.

I also messed with it in C++ and I hate how it mutalates the developer environment.

A good framework would not require a IDE plugin to be used.

Furthermore, Qt designer is absolutely awfull compared to Android Studio's or Visual Studio's (UWP apps) visual designers.

Support is also bad by deprecating things they have just introduced un the last version.

Try writing an OpenGL application with Qt, its a mess with the everchanging Qt API . And even worse: Qt leaking OpenGL state.

 

To give users an optimal experience you need to adapt to the platform they're running.

With Qt you're making something that feels out of place on most platforms.

This is why I absolutely hate web apps (apps that are actually websites, like PhoneGap junk).

Oh no! I've just begun with Qt, and hence I find it extremely helpful, easy, and and breeze to create apps with, from my view-point. I'm also only creating very basic widget applications, so I can't comment on its visual issues when deployed cross-platform, or about its tight OpenGL integration. Also, I've never seen any other implementation so smooth, like the Signals & Slots mechanism. To me, Qt is the dream-liner that helped me cross the vast void between CMD-driven apps, to GUI apps with buttons, line-edits, and other UI elements. :)

 

I recommended Qt to OP because, Qt with C++ is full of OOP concepts, like virtual functions, overloading, templates, etc. It will be very helpful for the OP, to learn true C++ with the aid of this frame-work.

 

If mine is a half-true answer, accept my apologies, but this is just my opinion, from the way I've used Qt...

 

BTW, I've still got Windows 7, can I create UWP apps? What is UWP actually, and how different is it from other 'regular' windows apps? Can it be created using C++?

 

Thanks! :)

Nothing to see here ;)

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, Anand_Geforce said:

Oh no! I've just begun with Qt, and hence I find it extremely helpful, easy, and and breeze to create apps with, from my view-point. I'm also only creating very basic widget applications, so I can't comment on its visual issues when deployed cross-platform, or about its tight OpenGL integration. Also, I've never seen any other implementation so smooth, like the Signals & Slots mechanism. To me, Qt is the dream-liner that helped me cross the vast void between CMD-driven apps, to GUI apps with buttons, line-edits, and other UI elements. :)

 

I recommended Qt to OP because, Qt with C++ is full of OOP concepts, like virtual functions, overloading, templates, etc. It will be very helpful for the OP, to learn true C++ with the aid of this frame-work.

 

If mine is a half-true answer, accept my apologies, but this is just my opinion, from the way I've used Qt...

 

BTW, I've still got Windows 7, can I create UWP apps? What is UWP actually, and how different is it from other 'regular' windows apps? Can it be created using C++?

 

Thanks! :)

You need Windows 10 to develop UWP apps.

 

Im not sure what the exact differences are but:

  • UWP runs on all types of devices (including Xbox)
  • Supports new UI stuff that is easier, scales better to different screen sizes and doesnt fuck up on high DPI devices (4k desktops, high resolution tablets/laptops)
  • Better input handling (touch, motion sensors, etc)

Desktop: Intel i9-10850K (R9 3900X died 😢 )| MSI Z490 Tomahawk | RTX 2080 (borrowed from work) - MSI GTX 1080 | 64GB 3600MHz CL16 memory | Corsair H100i (NF-F12 fans) | Samsung 970 EVO 512GB | Intel 665p 2TB | Samsung 830 256GB| 3TB HDD | Corsair 450D | Corsair RM550x | MG279Q

Laptop: Surface Pro 7 (i5, 16GB RAM, 256GB SSD)

Console: PlayStation 4 Pro

Link to comment
Share on other sites

Link to post
Share on other sites

On 9/7/2016 at 11:18 AM, Archetype117 said:

Hi.

 

Just wondered if anyone has any tips for learning C++ or any programing in general. I want to learn it but just don't know where to start

Start with a different language. Something like Python:

 

https://www.edx.org/course/introduction-computer-science-mitx-6-00-1x-8

 

Trying to learn C++ or C as a first language gets you into some bad habits that you'll have to break later on. They're awesome and very powerful languages once you know how to program though. But they're terrible for learning how to program.

Link to comment
Share on other sites

Link to post
Share on other sites

On 9/29/2016 at 9:52 PM, mathijs727 said:

You need Windows 10 to develop UWP apps.

 

Im not sure what the exact differences are but:

  • UWP runs on all types of devices (including Xbox)
  • Supports new UI stuff that is easier, scales better to different screen sizes and doesnt fuck up on high DPI devices (4k desktops, high resolution tablets/laptops)
  • Better input handling (touch, motion sensors, etc)

Are you using VS? My installer gets stuck at around 90% when I try to install the Windows 10 SDK 10.0.10240 but I do have the project templates...

Nothing to see here ;)

Link to comment
Share on other sites

Link to post
Share on other sites

25 minutes ago, Anand_Geforce said:

Are you using VS? My installer gets stuck at around 90% when I try to install the Windows 10 SDK 10.0.10240 but I do have the project templates...

Im not currently working on a UWP app (just plain old Win32, although I might convert it if I have the time).

The Windows 10 SDK installed for me without problems and I can run the template project (this is on Windows 10 Anniversary and Visual Studio 2015 Community Edition).

Desktop: Intel i9-10850K (R9 3900X died 😢 )| MSI Z490 Tomahawk | RTX 2080 (borrowed from work) - MSI GTX 1080 | 64GB 3600MHz CL16 memory | Corsair H100i (NF-F12 fans) | Samsung 970 EVO 512GB | Intel 665p 2TB | Samsung 830 256GB| 3TB HDD | Corsair 450D | Corsair RM550x | MG279Q

Laptop: Surface Pro 7 (i5, 16GB RAM, 256GB SSD)

Console: PlayStation 4 Pro

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×