Skip to content
View in the app

A better way to browse. Learn more.

Tip.It Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Where/How to learn C++

Featured Replies

Just curious on how you guys learned C++, and just in general any tips. I'd ideally not want to purchase anything like a book, but if you've found that it's a great resource worth my money then I'll consider it.

 

The only other programming language I really know is Java, so i'm fine with OOP. I also understand PHP if it makes a difference

 

Thanks!

- tips

 

EDIT: Sorry that this doesn't really flow, I have the flu and aren't thinking straight :D

treq5.gif

T R Tipster.png

  • Author

The only way to learn a programming language is to start using it. For c++ in particular this book comes highly recommended: http://www.amazon.co...tackoverfl08-20

I meant more like a website to learn the basics/what it can do

treq5.gif

T R Tipster.png

If you have some programs written in Java, try rewriting them in C++. It'll help you gain a feel for the language, without really having to worry about the logic.

 

Definitely recommend the book that obfuscator posted.

 

This is a good reference too, I guess: http://www.cplusplus.com/doc/tutorial/introduction/

  • Author

If you have some programs written in Java, try rewriting them in C++. It'll help you gain a feel for the language, without really having to worry about the logic.

 

Definitely recommend the book that obfuscator posted.

 

This is a good reference too, I guess: http://www.cplusplus...l/introduction/

That sounds like a good idea, thanks.

I'll check out the website and book!

treq5.gif

T R Tipster.png

  • Author

If you have some programs written in Java, try rewriting them in C++. It'll help you gain a feel for the language, without really having to worry about the logic.

 

Definitely recommend the book that obfuscator posted.

 

This is a good reference too, I guess: http://www.cplusplus...l/introduction/

I seem to get lost right around in here: http://www.cplusplus.com/doc/tutorial/pointers/

treq5.gif

T R Tipster.png

Their guide to pointers isn't very good. Honestly, I didn't understand them at all until they came up in class recently. Just know that their main use is for returning arrays. Google how to return arrays in C++ and you'll probably have a better understanding of them.

This may be helpful if you're having difficulty with pointers.

polvCwJ.gif
"It's not a rest for me, it's a rest for the weights." - Dom Mazzetti

  • Author

The only thing I don't get is why you would want to use the pointer. LIke what advantage is there to passing a pointer instead of just the variable itself?

Either way, I'll google that and read that link

treq5.gif

T R Tipster.png

The only thing I don't get is why you would want to use the pointer. LIke what advantage is there to passing a pointer instead of just the variable itself?

Either way, I'll google that and read that link

 

Pointers can be abstracted as references. When you pass a class in Java as a parameter, it passes it by reference; that is, it does not create a copy of the class. Instead, it passes the address of the data to the method. The same goes for storing it. The difference between this C++ code:

 

class A
{
public:
   int foo;
};

void ChangeFoo(A* a)
{
   a->foo = 1;
}

 

and this Java code:

 

class A
{
   public int foo;
}

static void changeFoo(A a)
{
   a.foo = 1;
}

 

is nonexistent. Java internally passes classes as pointers.

ozXHe7P.png

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.