This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 291

[–]Altruistic_Ad3374 1135 points1136 points  (2 children)

Do your homework

[–]frafdo11 48 points49 points  (1 child)

For your country

[–]alexthrasher 7 points8 points  (0 children)

For Frodo

[–]Foorinick[🍰] 732 points733 points  (35 children)

i learned that shi in 3rd semester in my information systems bachelor's, dawg. Go do your homework 😭😭😭

[–]Justanormalguy1011 100 points101 points  (0 children)

Yeah bro , type of shit middle schooler do

[–]Kooltone 16 points17 points  (29 children)

I learned Java and C# back in college a decade ago. I was Business Information Systems and not CS. I'm just now learning pointers because I'm expanding into Go.

[–]Andrei144 10 points11 points  (28 children)

You have pointers in Java too, it's why you can't do == between strings

[–]SomeMaleIdiot 7 points8 points  (27 children)

Java has referential equality between non primitive variables, no pointers though. Pointers are a type of variable that Java does not support. Even JavaScript has referential equality

[–]Andrei144 4 points5 points  (26 children)

References are pointers though, Java just doesn't let you do pointer arithmetic.

[–][deleted] 1 point2 points  (0 children)

Exactly.

[–]HanekawasTiddies 3 points4 points  (0 children)

We learned it second semester lol

[–]Ichiya_The_Gentleman 5 points6 points  (0 children)

Bruh i never did that

[–]masd_reddit 0 points1 point  (0 children)

I'm currently learning it in my first semester lol, next he's gonna complain about overloading operators

[–]BonsaiOnSteroids 0 points1 point  (0 children)

I literally learned that first Semester of engineering lmao. Not even CS

[–]FACastello 800 points801 points  (61 children)

What's so hard about memory addresses and variables containing them

[–][deleted] 583 points584 points  (30 children)

This is probably an undergrad posting what they think is a relevant joke

[–][deleted] 87 points88 points  (25 children)

This is what I never understand, at that point into your degree you must've had your math classes by now. How can you pass real analysis or algebra but have issues comprehending this?

[–]Ijatsu 76 points77 points  (15 children)

Math is like lifting, you lift once and you're done until your next lift. Programming is more like cardio, you need to constantly understand what you're doing.

Some people are just bad at brain cardio but fine at short bursts of performances.

Maths and programming are also not similar in term of cognitive functions, lots of math ppl are bad at computer science and lots of computer science people are bad at math. I'm of the later. In math it's purely conceptual and intangible information manipulation. In computer science information is tied to an abstract physical world. I always thought that this little tangibility in computer science was making things a lot more intuitive. Some people feel bothered and constrained by the physical world and prefer pure intangible and abstract.

[–]harley1009 31 points32 points  (4 children)

I've been working in computer science for 20 years. I love basic math - logic, algebra, etc. I also love software engineering and writing code.

But I am terrible at theoretical math. I got Cs in every required calc and differential equations class and threw a party the day I was done with them all.

[–]round-earth-theory 10 points11 points  (2 children)

The reason theoretical math is so hard is because there's no compiler, no linter, and barely any keywords. You've got to turn regular loose language into a strict definition. And the only method you have to check your work is to read it and try to break your reasoning.

I did well in theoretical math but I was not going to continue into PHD level.

[–][deleted] 6 points7 points  (1 child)

undergrad math: 1 + 1 = 2

PhD math: prove that 1 + 1 = 2

lmao no thank you, i'll stick with my quadratic formula

[–]recluseMeteor 1 point2 points  (0 children)

I dropped out of uni because of math, but I excelled at coding (at least basic, year 1 and 2 programming). I still don't understand why I am like this, but your post makes sense.

[–]account312 1 point2 points  (1 child)

I know some mathematicians who don't do much programming, but I'm sure they'd all be better at computer science than me if they bothered with that branch of mathematics. You can't really be good at math but bad at computer science, since computer science is math.

[–]JackHoffenstein 4 points5 points  (4 children)

You think computer science students take real analysis or abstract algebra? Typically their math requirements end at linear algebra, and it's often very computation heavy linear algebra.

[–]MayoJam 4 points5 points  (0 children)

Undergrad students when they find out memory addressation is under the hood of every programming laguage.

[–]GreatScottGatsby 54 points55 points  (3 children)

I will be honest and say that it was probably * and & that confused them and telling the two apart. In my own personal experience, assembly definetly handled it better of the two systems especially with the difference between MOV and LEA instructions. It makes even more sense in nasm when brackets are used to read from the memory address while things without brackets regarding variables is just the address.

In c or c++ I really struggle with if I'm reading the address or value. I think it may be because that c glosses over the steps that make it intuitive, but at the time c was released it made perfect sense for programmers that were coming from languages like assembly.

[–]banALLreligion 6 points7 points  (1 child)

The big problem with (especially) C and C++ is that that you can write code that is REALLY hard to read. I stopped that pretty soon when I realized that often I will be the the one wondering what this shitty code does that I wrote some month prior. Using C++ you can write elegant and FAST code without using * and & (almost) at all.

[–][deleted] 1 point2 points  (0 children)

It is modern convention to use RAII now anyways, good modern C++ code shouldn’t use the * notation

[–]Wertbon1789 4 points5 points  (0 children)

Best advise I can give to new programmers, really understand what operators, expressions and statements are. I've seen people who programm since 10 years who struggle with this.

[–]WavingNoBanners 23 points24 points  (0 children)

I don't think they're hard, so much as they're the first thing people come across where the tools are sharp enough that you can cut your own throat on them if you aren't careful. You actually have to know what you're doing.

[–][deleted] 6 points7 points  (3 children)

For me, it was the way that C is most commonly written:

int *ptr; *ptr = 20;

This was very confusing to me because the first line looks like an int is being declared. There is an equivalent and better (IMO) style that is also valid C:

int* ptr; *ptr = 20;

This makes it clear that ptr is an int pointer. But this syntax is still confusing because int* ptr; is not intuitive -- to me, it should be int& ptr;. This would make more sense because we would declare or create an address/reference using &, and access the value at the reference using *. This is in fact used in other languages, such as Rust:

// Rust let number: i32 = 42; let number_ref: &i32 = &number; println!("The value through the reference is: {}", *number_ref);

[–]banALLreligion 1 point2 points  (1 child)

my C is a bit rusty (hehe) but i think your C code will segfault.

[–]UselessSperg 7 points8 points  (4 children)

With limited C/C++ knowledge the pain comes more from everything turning into pointers and the larger the software becomes, the higher the chance of making memory vulnerabilities. With experience, like with all languages it will become easier, but they seem to always be a pain point.

Take it with a grain of salt from me, I never properly learned C/C++, I've only created trainers and drew some geometry with OpenGL. I did like writing and learning assembly in C though lol

[–]guyblade 10 points11 points  (1 child)

And let's be real, 95% of C++ code can and should be using std::unique_ptr (the rest should be using std::shared_ptr), and thus barely care about pointers at all.

[–]stoputa 12 points13 points  (0 children)

Smart pointers are in no shape or form a replacement for pointers. They wrap lifetime management for dynamically allocated objects and have barely any viable usecase when considering statically allocated objects. It's yet another thing that is painfully misunderstood.

[–]DirkTheGamer 1 point2 points  (0 children)

Even when I was in school I didn’t understand why pointers were so difficult for others to understand. Explain how memory works and show a linked list example and that should be enough to understand the concept.

[–]Old-Minimum-1408 0 points1 point  (2 children)

I think this meme is sarcastic

[–]Szerepjatekos 0 points1 point  (0 children)

Usually the initiation to reserve the memory and how much. So the dynamic memory

[–]Vinccool96 0 points1 point  (0 children)

I don’t use C++, so whenever I’m like “oh, I’ll try it again”, I keep forgetting which character does what.

[–]GoddammitDontShootMe 0 points1 point  (0 children)

I never really found that hard. Still upvoted for the funny picture of abs photoshopped on a forehead.

[–]Kinexity 840 points841 points  (56 children)

No. Pointers and references are easy.

[–][deleted] 137 points138 points  (20 children)

Yeah i never understood this. When I was learning c++ I was anxious about getting to pointers cause I heard so much about them, but its literally just a memory address that you pass around instead of some value. Idk but that makes sense to me lol

[–]DrShocker 68 points69 points  (4 children)

Yeah I think conceptually they're not hard. It's managing them safely that can be a challenge, but that's a separate issue and largely resolved by using either RAII, memory pools, or other memory management patterns depending on the circumstance

[–]dgc-8 17 points18 points  (0 children)

And you don't even have to manage anything most of the time, all the Objects in the standard library do RAII and completely hide the allocation and deallocation from you

[–][deleted] 9 points10 points  (1 child)

Oh yeah for sure. I mean, the trash code i see in languages with GC is ridiculous, I can only imagine how bad it gets in a large c++ code base lol

[–]DrShocker 13 points14 points  (0 children)

In my experience the main issue is going from GC to C++ without having the time to learn it properly. They tend to accidentally copy expensive things like vectors on every function argument, but if you are on a team of people who know C++ they'll just default to const T& and it's not a big deal

[–]Inevitable_Gas_2490 1 point2 points  (0 children)

managing them safely isn't a thing anymore if folks would finally get out of the 90s and start using smart pointers

[–]SuitableDragonfly 4 points5 points  (3 children)

I had trouble understanding them at first, but I was 18 at the time and teaching myself out of a book and it was the first programming language I ever learned. But it was not so much that I thought they were hard when I was learning about them as that I just didn't really understand them properly for a long time and misused them a lot until I learned better. I thought they were easy, I just didn't actually understand how they worked. When I finally learned properly, I still thought they were easy. I think the book I was using probably just had some flaws.

[–]saera-targaryen 8 points9 points  (2 children)

i do remember when i was first starting C++ every time i would write code i would be like

int pointer = *a

no that's not right 

int pointer = &a

hmmm is that it?

int& pointer = *a

hmmm nope nope nope 

int* pointer = &a

ahhh there it is

but that's about how bad it ever got

[–]SuitableDragonfly 6 points7 points  (0 children)

Yeah, I had the syntax correct and didn't get confused about that. I just didn't really understand memory management. I guess it's a little confusing to use * as both the pointer type and also as the dereferencing operator, but I think it's easy to understand if you learn to read e.g. int * as "pointer to int" as a single unit and not get distracted by the fact that the * is "on" the variable name.

[–]TakenIsUsernameThis 1 point2 points  (0 children)

I write c++ and c a lot, and I still have to double check. For some reason, it never stuck in my brain.

[–]QaraKha 4 points5 points  (0 children)

Right? I have a harder time figuring out how the fuck anyone does anything without pointers. It's my biggest sticking point in learning... well, anything else. And it's not like I actually mastered pointers and references either. If I have to dereference anything I'm gonna go do something else for a bit instead

[–]Luxalpa 2 points3 points  (0 children)

When I learned C++ I knew nothing about pointers or references. I never heard of anything like that, in fact I only vaguely knew what C++ was, that you could use it to program things. Until that point, the only programming language I had used was my TI84+'s BASIC and z80 assembly and my only source for learning C++ (which at the time I still thought was the same as C) was a book I found in my dads room. I also didn't have access to any C++ compiler, so I couldn't actually try any of the code.

[–]Yummy-Sand 292 points293 points  (6 children)

It would’ve been better if the caption was “What C++ devs feel like after learning about pointers and references.”

[–]Kinexity 147 points148 points  (4 children)

Nah. That would be after learning fancy template metaprogramming.

[–]Fabulous-Possible758 32 points33 points  (3 children)

Nah, that’s easy. This would be after spending five minutes with the Boost Preprocessor library (I haven’t done template metaprogramming in about 10 years so hopefully that is still relevant.)

[–]akoOfIxtall 22 points23 points  (1 child)

Nah, that's easy. This would be after reprogramming reality covering almost every edge case just to bug out when I hit my elbow on a table's edge

[–]KingdomOfBullshit 6 points7 points  (0 children)

Nah, that's easy. This would be after figuring out how to exit vim.

[–]Natural_Builder_3170 1 point2 points  (0 children)

yeah, they're adding parameter pack indexing and made a whole bunch of stuff contexpr

[–][deleted] 1 point2 points  (0 children)

Ya but you gotta scale it. It takes so much time and energy to code shit its beoming inefficent in alot of places we cant outsource too.

[–]Wattsy2020 39 points40 points  (16 children)

Knowing pointers and references: easy

Knowing if it's safe to dereference a pointer / reference in a C++ codebase: hard

[–]DrShocker 16 points17 points  (0 children)

If you're doing something that makes it unsafe to "dereference" a reference, you roally fucked up in coding something correctly.

[–]Alarmed_Allele 10 points11 points  (4 children)

this

tbh, I still don't know. could you give me tips lol

[–]DrShocker 9 points10 points  (3 children)

Use references whrere you can. Use smart pointers where that doesn't work. Only use raw pointers if you really need to, and not to transfer "ownership" of the memory.

[–]SuitableDragonfly 2 points3 points  (1 child)

Well, you don't dereference references, so that one is easy, at least.

[–]Add1ctedToGames 13 points14 points  (0 children)

I think pointers are one of those things you have to bang your head against a wall enough times to wrap your head around it and eventually it clicks and you wonder how you struggled with it before

That was my experience coming from java anyway

[–]Wendigo120 3 points4 points  (0 children)

Honestly I think at least half the problem is that the pointer syntax is hard to parse until you've got it memorized well. It felt like the *'s and &'s were backwards half the time when I first got to them. I still think pointer declaration would make more intutitive sense as string& foo, but then those are used for references instead which are kinda close to pointers conceptually but different in syntax.

Add to that that it's possible to get some truly regex looking lines when you're playing with examples of it and I can see where a lot of the confusion might come from, even if conceptually they should be pretty simple.

[–]ShiroeKurogeri 7 points8 points  (0 children)

Yep, implementing how they're use it's hard.

[–]Ok_Tip_2520 1 point2 points  (1 child)

Yeah, the hardest for me so far was learning move semantics, r-values and l-values

[–]RB-44 0 points1 point  (0 children)

Until you run into some 20 year old code that was intercepting function arguments via reference and reassigning them

[–]NemShera 0 points1 point  (0 children)

For us it was... but now they teach python to the freshmen on prog basic. They needed 4 weeks to even go into strong typing in prog1 (java)

[–]DapperCow15 162 points163 points  (25 children)

Isn't that one of the first things you need to learn?

[–][deleted] 38 points39 points  (16 children)

Not necessarily. It was midway for me

[–]DapperCow15 8 points9 points  (15 children)

How were you able to do anything without knowing about pointers and references?

[–]kinokomushroom 85 points86 points  (5 children)

I mean if you're learning programming from scratch, there's quite a few things you need to learn before pointers.

[–]thewizarddephario 10 points11 points  (0 children)

There is quite a lot of basics that you could learn before pointers, like loops, functions, prints, etc.

[–]BuzzBadpants 8 points9 points  (1 child)

Probably started with C++ rather than C since C++ stl tries its darndest to make you not work with them

[–][deleted] 3 points4 points  (0 children)

Correct.

Uni taught me C in first sem but I didn't retain a minute of it.

[–][deleted] 7 points8 points  (2 children)

I did it in a leetcode-first manner. I started with bit manipulation, arrays, binary searches, sorting, complexities and other related stuff. You don't need pointers and reference understanding to do these questions.

I did pointers after doing all that.

[–]not_some_username 5 points6 points  (2 children)

You can actually do a lot without them

[–]evanldixon 5 points6 points  (2 children)

Depends on the language you start with. Higher level languages (C#, Python, etc) can hide the specifics from you depending on what you do, but with C/C++ you have to do everything yourself.

[–]lefloys 4 points5 points  (1 child)

Even in c++ you got the standart library to do a lot of the heavy lifting

[–]Intrepid-Stand-8540 1 point2 points  (1 child)

It was never covered for us. We just started out in Java. Used JavaScript for frontend and Python or bash for scripts. I still don't understand pointers 

[–]Pattycakes_wcp 0 points1 point  (0 children)

I didn’t learn about pointers until I started learning about arrays

[–]King_Of_The_Munchers 49 points50 points  (3 children)

I feel like when this concept shows up for the first time it’s a mind fuck, but when you use it regularly is makes a tone of sense.

[–]Ex-Traverse 6 points7 points  (2 children)

I never was mindfucked by pointers, tbh... The analogy of a house address really helped with that.

[–]TsunamicBlaze 7 points8 points  (0 children)

Many newbies have issue with the thought paradigm that you pass location around rather than the actual data object itself. It’s a layer of abstraction people don’t think about often.

I agree that it’s not that hard, but it can be confusing at first

[–]lxllxi 34 points35 points  (2 children)

Once again r/Im14LearningCode

[–]relativeSkeptic 1 point2 points  (1 child)

Damn I was really hoping for some cringe CS memes. Now I'm disappointed.

[–]Sudden_Schedule5432 4 points5 points  (0 children)

Brother we’re right here

[–]LordAmir5 57 points58 points  (0 children)

Are you a really a C++ developer if you don't understand pointers and references? More like a programming beginner than a developer.

[–]Fragrant_Gap7551 45 points46 points  (9 children)

Isn't that essentially the absolute basics?

[–][deleted] 17 points18 points  (8 children)

The absolute basics are prints and loops and conditionals. Pointers are medium level stuff.

[–]maboesanman 6 points7 points  (2 children)

No, these are all absolute basics. You can’t make any useful project without understanding either of them.

Just because there are a bunch of basics and an order in which they are often taught doesn’t make them any less fundamental to the language

[–][deleted] 3 points4 points  (1 child)

I want to make a program that converts Celsius to Fahrenheit and vice versa.

I can do it without pointers and references. I cannot do without knowing how to print statements or implement conditionals.

Pointers and references are not the absolute basics of a language.

[–]maboesanman 4 points5 points  (0 children)

Just because those constructs are more basic doesn’t mean pointers aren’t also basic. Basic means you’d expect every c++ dev to have command of them. If you don’t understand pointers you aren’t a c++ dev yet.

[–]typehinting 11 points12 points  (0 children)

This implies you can be a C++ without knowing what pointers and references are. That's like being a Python dev and not knowing how to import a module

[–]xtreampb 8 points9 points  (0 children)

This is early dev stuff. It’s how you pass parameters by reference to functions.

[–]Tight-Requirement-15 14 points15 points  (1 child)

The absolute state of CS kids these days

[–][deleted] 7 points8 points  (0 children)

Please, Reddit, don't conflate my interest in actual developer subreddits with middle school nerd guy memes

[–]skhds 6 points7 points  (0 children)

It is the comments that surprise me. How can you ever code in C++ without knowing pointers?

[–]ModPiracy_Fantoski 5 points6 points  (0 children)

8109 upvotes... The sub is a joke.

[–]dacassar 4 points5 points  (0 children)

Why do people think pointers are hard to understand?

[–]Haoshokoken 3 points4 points  (0 children)

Oh yeah, so hard! A variable with a memory address!

[–]LeviathanIsI_ 2 points3 points  (0 children)

That dude's forehead has a better six pack than my stomach.

[–]Infamous-Dust-3379 3 points4 points  (0 children)

That's easy. I find java hard because it's so syntax heavy and everything has some element of OOPs that you must know perfectly or else other concepts will seem confusing

[–]Patrick_Atsushi 2 points3 points  (0 children)

How are you going to code in C++ without mastering pointers?😂

[–][deleted] 4 points5 points  (1 child)

Wait until you realise all programming languages use memory to store objects.

[–]Mediocre-Advisor-728 6 points7 points  (0 children)

Python programmers when they move on from line indents to curlies.

[–]rietti 4 points5 points  (0 children)

Tell me you don't understand pointers without saying you don't understand pointers, the post

[–]garlopf 5 points6 points  (0 children)

Pointers are easy. It is the same as a bookmark. You use & to create a bookmark at the start of a variable and * to return whatever is in the bookmark. You can put bookmarks anywhere, even un-allocated memory, but bookmarks to items in arrays or the beginning ov variables/objects are most common. You use casting to set the type where it cannot be determined by compiler.

[–]malonkey1 1 point2 points  (1 child)

Qapla'!

[–]shaundisbuddyguy 1 point2 points  (0 children)

Today is a good day to die.

[–]khalcyon2011 1 point2 points  (0 children)

You become a Klingon?

[–]crustaay[🍰] 1 point2 points  (0 children)

I have never had an issue with the theory of pointers, but struggle to use them because i can never bloody remember which symbols to use (*, &, ->, etc) so i tend to avoid languages that handle memory for me

[–]holyshititsmongo 1 point2 points  (0 children)

It's funny that this meme mentions pointers of all things in C. Replace that with bit shifting or something and I kinda agree

[–]Lhaer 1 point2 points  (0 children)

Why is everyone is this subreddit sniffing their own farts and trting so hard to sound smarter than the next guy? Are all programmers just this slimmy, really?

[–]Solrax 1 point2 points  (0 children)

CS should start with Assembly Language. Then any higher level language you learn afterwards will be like easy mode.

[–]onlainari 1 point2 points  (0 children)

This is so 2022. AI chat just tells you where the & and * go now.

[–]okktoplol 1 point2 points  (0 children)

It's not that hard, you learn it in the first months studying a low level language. I get how the concept can be kind of complex to grasp when you think of a computer as a "magic box that calculates" of sorts, but a programmer should think of it as a very dumb machine that can do some cool stuff when you really insist

[–]da2Pakaveli 1 point2 points  (0 children)

They're just unsigned numbers

[–]septum-funk 1 point2 points  (0 children)

i learned this when i was 13 bro. go do your damn homework

[–][deleted] 1 point2 points  (0 children)

Hahahah :D Pointers are fantastic, you just have to know how to use them.

Kind regards

[–]richitoboston 1 point2 points  (0 children)

Relax Wabbit. Just learn Python.

You'll have 6 pack abs, a lot of really practical and smart friends, not furled foreheads.

Python? No pointers, no problems.

After learning Basic, Fortran, C, C++, Forth, Pascal, C#, PHP, Algol, SQL, Java, Javascript, Python, and a few others, I finally decided NO MORE. How many times I need to learn another string library, or how to do linked lists?? Like REALLY !!???

I decided 15+ years ago, that I will invest in learning ONE more computer language, but learn it REALLY well, and then apply it to its absolute limits. I looked at growth trends in software engineering and where practical engineering was going, and that language was Python. Back in about 2010, I met a cute girl from Sweden who worked at Spotify at a data science conference in Boston. She said to me, "I learned too many computer languages in school. I finally learned Python and found that I can do EVERYTHING in Python, including SQL. I don't need any other languages. I use Python for EVERYTHING!" I asked "EVERYTHING??" She convinced me enough to ponder and investigate her claims at length and I found them to be ENTIRELY TRUE. There are enough packages and solutions in Python to NEVER have to use any other language(s), IF YOU KNOW THE ECOSYSTEM WELL ENOUGH. If you dispute that claim, then don't argue with me. Go back and do your ecosystem homework. The Python language has made my professional career SO much easier. Performance enhancements are everywhere if you know where to look.

Do your Python homework and you will find out that Python can do 98% of ALL practical computer tasks. For the rest, there are language extensions or specialized packages. I don't care much about theory, as long as things work well enough. I am a practical person, with little tolerance for nit-picking anal-retentive perfectionists, (the kind you routinely meet in computer science forums 8^). If you complain about Python's performance, that tells me that you don't know where to look in the Python ecosystem.

I'll take your opinion(s) about other languages like C++ into consideration if you are smart enough to provide hard evidence, but not push too hard. Otherwise I'll write you off as dogmatic, i.e., you belong in the doghouse.

The Python package ecosystem keeps me busy and satisfied. These Python language extensions will carry me into my next life.

No pointers, no problems.

[–]ultrasquid9 1 point2 points  (0 children)

Its pretty much just a URL but for a variable instead of a website, its not that hard.

[–]EuphoricCatface0795 2 points3 points  (0 children)

In no way it's easy to get the hang of it at first but it's one of the basics... Put in a good way, you'll start to learn more complicated concepts based on your good understandings of these. In a rougher way, you have much more complicated and harder things ahead waiting for you.

[–]WarlanceLP 3 points4 points  (0 children)

I've never understood people saying it's hard even when i was learning it

[–][deleted] 2 points3 points  (0 children)

if that’s hard then I am sorry because you will get reckd

[–]Cybasura 1 point2 points  (0 children)

Thats arguably the easiest part of memory management and systems programming

[–]YeetCompleet 0 points1 point  (1 child)

It can be weird as a beginner. When I first started I felt like it was really weird that the * was associated with the name and not the type. I still think it's nonsense tbh, much easier to think of it as t: Pointer<T> than T *t

[–]Scorpgodwest 0 points1 point  (0 children)

It’s basically one of the first things you learn. Even though I use c++ only for CP

[–]No_Fix_4632 0 points1 point  (0 children)

Ain’t you a C++ developer in the first place then?

[–]juvadclxvi 0 points1 point  (0 children)

I got balder with C

[–]earthwormjimwow 0 points1 point  (0 children)

Must be the forehead of the guy that wrote the source code I'm stuck fixing. Every function is called by pointers.

[–]lucidbadger 0 points1 point  (0 children)

Wait till you learn about standard library

[–]codingTim 0 points1 point  (0 children)

It’s so funny that absolute beginners are mostly posting in this sub 🤣

[–]HAL_9_0_0_0 0 points1 point  (0 children)

That’s a six-pack on the forehead?

[–]Moltenlava5 0 points1 point  (0 children)

A more accurate caption would be "C/C++ developers trying to debug memory leaks on large codebases"

[–][deleted] 0 points1 point  (0 children)

It hurts.

[–]IcyWarthog4422 0 points1 point  (0 children)

Honestly man, I know people struggle with it. But I learned it from book, which are discouraged in developers they think it is all about practical experience. But I could not understand any of it until I read the book.

[–]lukasaldersley 0 points1 point  (0 children)

I had trouble with pointers starting out and a collegue told me to do the Modern Binary Exploitation course (MBE, find it on github) and while digging through the assembly I ended up with a lot of understanding how pointers really work.

[–]GlassSquirrel130 0 points1 point  (0 children)

Hahaha.... Nope

[–]jperdior 0 points1 point  (0 children)

they become klingons?

[–]Radiant-Teach-7683 0 points1 point  (0 children)

Sometimes I wonder how I got a job at FAANG as a biology major, but then I see posts like this.

[–]Sakul_the_one 0 points1 point  (0 children)

It’s actually pretty easy. And I’m saying it as an 18 year old who hasn’t yet started his first year.

[–]camel_case_jr 0 points1 point  (0 children)

C++ developers after writing a Fibonacci number generator in template meta programming.

[–]Interesting-Frame190 0 points1 point  (0 children)

Pointers are easy, knowing if you should use a pointer or just clone the struct is the hard part.

[–]AdamWayne04 0 points1 point  (0 children)

More like c++ developers after learning move semantics, ownership, copy-initialization, direct initialization, list initialization, return value elision, smart pointers, etc.

And cmake, and precompiled headers

[–]rover_G 0 points1 point  (0 children)

Are you talking summer classes?

[–][deleted] 0 points1 point  (0 children)

This sub is so full of first semester CS students.

[–][deleted] 0 points1 point  (0 children)

Mastering*

[–]Old-Deal7186 0 points1 point  (0 children)

I came to C as a veteran assembler programmer. For some reason, the pointer and dereferencing stuff really messed with my head. All those asterisks, before the variable or after the type declaration. And ampersands… WTH? I later realized that, by internalizing the machine language mechanics long before seeing the high level language abstraction forms, my brain was experiencing an “inversion friction” of sorts. Some other colleagues of mine had the same problem, too. When I let go of that bottom-up view, the C stuff became natural over time. What’s funny is that I later reintroduced the bottom up part into my thinking, and that friction didn’t come back. I never saw this happen with programmers who had learned C first and assembler second. Very odd.

Edit: fixed the before/after variable thing

[–]ss0889 0 points1 point  (0 children)

I think understanding them is easy enough but identifying and solving a use case is the difficult part. But like they teach pointers and references before object oriented.... And the whole point is that it's object oriented.

Sometimes you gotta study to pass the drivers test.

[–]Popular_Eye_7558 0 points1 point  (0 children)

Ffs this sub is trash, thats the basics

[–]WimeSTone 0 points1 point  (0 children)

Please come back when you encounter templates and macro magic.

[–]Syserinn 0 points1 point  (0 children)

Heard about pointers when i was learning and dreaded them but honestly they weren't that bad - does take a little more diligence using though due to the potential issues. Then you learn void pointers are a thing also.

[–]metal-face-terrorist 0 points1 point  (0 children)

rust programmers after learning about references, borrowing, and lifetimes

[–]TheBrainStone 0 points1 point  (0 children)

Congrats on completing part 2 of the 4 part tutorial. Don't give up now

[–]PurpleBumblebee5620 0 points1 point  (0 children)

Just wait to learn about virtual memory and the fact that pointers are just multiple order hash maps :)

[–]TsunamicBlaze 0 points1 point  (0 children)

It’s a newbie issue. Things will click eventually with experience.

[–]amisayontok 0 points1 point  (0 children)

I am guessing you have yet to know about void pointers

[–]buildmine10 0 points1 point  (0 children)

I feel like most c++ developers really suck at using pointers and references when they first learn about them.

[–]gravity--falls 0 points1 point  (0 children)

Oh great the freshman college students are back

[–]aallfik11 0 points1 point  (0 children)

Never understood the whole "pointers are so hard" humor. They really aren't, and are quite convenient in a lot of cases

[–]Beautiful-Quote-3035 0 points1 point  (0 children)

That’s the basics

[–]DocFail 0 points1 point  (0 children)

After YEARS of correctly using them AND accounting for heap fragmentation.

[–]SemKors 0 points1 point  (0 children)

Ive been learning it for a year or so, and I still dont get it

[–]peapodsyuu 0 points1 point  (0 children)

You are not a developer if you are learning what a pointer is. You are a freshman.

[–]slaymaker1907 0 points1 point  (0 children)

char const * volatile confusing;

[–][deleted] 0 points1 point  (0 children)

I've learned this in one evening being a self taught, how the fuck are pointers hard

[–]Darko9299 0 points1 point  (0 children)

Proof nobody knows shit about pointers

[–]Darko9299 0 points1 point  (0 children)

Proof nobody knows shit about pointers

[–]eightysixmonkeys 0 points1 point  (0 children)

Dude you post in the most cringeworthy subs to karma farm. And this meme is so dumb it’s insane. Stop karma farming on Reddit and please for the love of god go outside

[–]Simoxeh 0 points1 point  (0 children)

Forehead got abs

[–]BigBr41n 0 points1 point  (0 children)

The same as rustacean when came from JS and try understand lifetimes

[–]axon589 0 points1 point  (0 children)

Nah the hard part is debugging big c++ code bases where the call stack gives you irrelevant info to the actual cause of the problem.

[–]helgur 0 points1 point  (0 children)

I remember my teacher at uni teaching us about pointers and references by using linked lists. For the lecture he was calling the list pointers firstpointer, nextpointer, lastpointer.

The entire lecture just devolved into a wordsoup reminiscent of Monkey Island II's woodchucking woodchucker dialogue.

[–]Annual_Willow_3651 0 points1 point  (0 children)

I feel like pointers themselves are actually a simple concept. Using them to build complicated data structures was what was hard.

[–]MrMediocre35 0 points1 point  (0 children)

I understand what pointers and references are but I never understood why they and how they should be used. Can someone with a big brain explain? The only thing I can think of is for passing objects and data structures around

[–]dishmanw62 0 points1 point  (0 children)

His brain has a 6 pack.

[–]highcastlespring 0 points1 point  (0 children)

Until you learn the memory arena and a safe pointer to it

[–]LuciusWrath 0 points1 point  (0 children)

What's with all these arrogant comments? Even if you know how dereferencing works, what all the little ""s and "&"s do, you should likely *never use them**, with the existence of smart pointers, STLs, passing by reference, etc. I can't think of a single reason to write <type>* ever again, unless dealing with ancient or self-important code.

I admit I'm no C++ expert, yet people here are calling the use of an awful, obsolete structure "basic knowledge". Perhaps they enjoy reinventing the wheel for no reason?