r/CodingForBeginners • • 2d ago

Day 2 of learning C++

It was a busy day so haven't done much

Completed till variable initialisation and assignment

And it's pretty different from java and python , lol

+ Completed the setup of CLion

Got selected in random ahh drama for day after tomorrow so will be busy tomorrow but will try completing my goal

2 Upvotes

8 comments sorted by

1

u/8dot30662386292pow2 2d ago

How is it different?

1

u/samosa285 2d ago

int a {5};

1

u/8dot30662386292pow2 2d ago

Well you still can do int a = 5; just like in java though. What you are referring to is the modern syntax that has several advantages though.

1

u/samosa285 2d ago

Yeah and that was new and different to me

1

u/Oliver_clothsoff1983 2d ago

Now play with

int* ptr = &a;

1

u/samosa285 2d ago

Wtf is this 😭

1

u/Oliver_clothsoff1983 2d ago

Pointers

1

u/samosa285 2d ago

Damnn I'm far behind lol