#C  and  Cpp Programming
Explore tagged Tumblr posts
david-goldrock · 10 months ago
Text
My program crashed for an hour or so and I tried to fix it
I finally fixed it
Twas a fucking compiler command gone bad
My code was good
FUCKKKKKKKKKKK
77 notes · View notes
webthreecorp · 2 months ago
Text
Mastering Linked Lists: Beginner's Guide
Hey Tumblr friends 👋
After learning about Arrays, it's time to level up! Today we’re diving into Linked Lists — another fundamental building block of coding! 🧱✨
So... What is a Linked List? 🤔
Imagine a treasure hunt 🗺️:
You find a clue ➡️ it points you to the next clue ➡️ and so on.
That's how a Linked List works!
🔗 Each element (Node) holds data and a pointer to the next Node.
It looks something like this: [data | next] -> [data | next] -> [data | next] -> NULL
Why Use a Linked List? 🌈
✅ Dynamic size (no need to pre-define size like arrays!) ✅ Easy insertions and deletions ✨ ✅ Great for building stacks, queues, and graphs later!
❌ Slower to access elements (you can't jump straight to an item like arrays).
Basic Structure of a Linked List Node 🛠️
Tumblr media
data -> stores the actual value
next -> points to the next node
📚 CRUD Operations on Linked Lists
Let’s build simple CRUD functions for a singly linked list in C++! (🚀 CRUD = Create, Read, Update, Delete)
Create (Insert Nodes)
Tumblr media
Read (Display the list)
Tumblr media
Update (Change a Node’s Value)
Tumblr media
Delete (Remove a Node)
Tumblr media
🌟 Final Thoughts
🔗 Linked Lists may look tricky at first, but once you master them, you’ll be ready to understand more powerful structures like Stacks, Queues, and even Graphs! 🚀
🌱 Mini Challenge:
Build your own linked list of your favorite songs 🎶
Practice inserting, updating, and deleting songs!
If you loved this explainer, give a follow and let's keep leveling up together! 💬✨ Happy coding, coder fam! 💻🌈 For more resources and help join our discord server
4 notes · View notes
therainistumbling · 1 day ago
Text
WHAT THE FUCK DO YOU MEAN C++ DOESN'T HAVE A SPLIT FUNCTION
3 notes · View notes
tarffie · 2 years ago
Text
me finally diving into cpp programming making my first game idea, after looking the stuff I need to go through this is my only reaction
Tumblr media
10 notes · View notes
mimimicpp · 1 year ago
Text
Hi all.
Today I want to share the result of many days of work.
I finished making a character input field for my application. And although some text editing capabilities are not available, the required minimum is present.
The following text editing options are currently available:
Typing.
Deleting characters using the backspace key.
Moving the carriage between characters.
Selecting characters using the Shift key.
Copying, cutting, pasting characters using the keys Control + C, Control + X and Control + V. Using the clipboard.
The next thing I want to do is read some books about C++. And then continue working on the project.
3 notes · View notes
stalkingmyfriends · 1 year ago
Text
Fun spike in motivation, gonna go learn literally an entire programming language, brb
3 notes · View notes
waterfaii · 1 year ago
Text
CodeBeauty
POINTERS introduction
#include <iostream> using namespace std; int main(){ /* int n = 5; cout << n << endl; output: 5 */
// is for a comment line and /**/ is for multiple line comments //I make it like this so you can paste it immediately into a compiler //variable - &address - *pointers. //START //just like variable, a pointer is a container as well, storing an address (a memory location) //n is a variable meaning that it is a container storing certain value //because it's a container, it has it's address inside the memory, a physical location //in order to check the location / which address :
/* int n = 5; cout << &n << endl; output: 006FFD64 */
//because it's not always fun to remember long address numbers, so we give them names - variables. we create a pointer to name an address and easily access it.
//POINTERS //how to create a pointer holding address of our n variable:
int n = 5; cout << &n << endl;int* ptr = &n; cout << ptr <<endl; //in order to indicate that you're creating a pointer, use * star (int*) //then give it a random name (ptr) //assign it (to ptr) the address of our n variable which is = &n (= assign)(& address)(n variable) cout << *ptr << endl; // a star * before the pointer's name will only reference the pointer and then find the VALUE of the ADDRESS //which is our original variable n //basically we're asking for the value 5, not the address 006FFD64 //CHANGE THE VALUE (5) stored in the pointer ptr address: *ptr = 10 ; //a star * means access the memory location and (=)assign a NEW (10) value //let's check if it's now 10 instead of 5 cout << *ptr <<endl; cout << n ; //both *ptr and n now show 10
//NOTES //pointer has to be of the SAME TYPE as the variable it is pointing to //int pointer to int variable, not int to float //char pointer to char variable, bool pointer to a bool variable, etc //you can't assign a value to a pointer, it has to point to an address //first create a (example) variable to store that variable's & address to the pointer //pointers are problem solvers and not the casual way it's used in these examples system("pause>0"); return 0; }
3 notes · View notes
fortunatelycoldengineer · 1 year ago
Text
Tumblr media
C language MCQ . . . . write your answer in the comment section https://bit.ly/3UA5nJb You can check the answer at the above link at Q.no. 20
3 notes · View notes
david-goldrock · 10 months ago
Text
My biggest argument against god's existence is that cpp exists
7 notes · View notes
webthreecorp · 2 months ago
Text
🌟 Understanding Arrays: A Beginner’s Deep Dive! 🌟
Hey Tumblr friends 👋
Today I want to break down something super important if you're getting into coding: Arrays. (Yes, those weird-looking brackets you've probably seen in code snippets? Let’s talk about them.)
So... What Exactly Is an Array? 🤔
Imagine you have a bunch of favorite songs you want to save. Instead of creating a new playlist for each song (chaotic!), you put them all into one single playlist.
That playlist? That’s what an Array is in programming! 🎶✨
An array is basically a container where you can store multiple values together under a single name.
Instead of doing this:
Tumblr media
You can just do:
Tumblr media
Why Are Arrays Useful? 🌈
✅ You can group related data together. ✅ You can loop through them easily. ✅ You can dynamically access or update data. ✅ You keep your code clean and organized. (No messy variables 👀)
How Do You Create an Array? ✨
Here's a simple array:
Tumblr media
Or create an empty array first (you must specify size in C++):
Tumblr media
Note: C++ arrays have a fixed size once declared!
How Do You Access Items in an Array? 🔎
Arrays are zero-indexed. That means the first element is at position 0.
Example:
Tumblr media
Changing Stuff in an Array 🛠️
You can update an item like this:
Tumblr media
Looping Through an Array 🔄
Instead of writing:
Tumblr media
Use a loop:
Tumblr media
Or a range-based for loop (cleaner!):
Tumblr media
Some Cool Things You Can Do With Arrays 🚀
In C++ you don't have built-in methods like push, pop, etc. for raw arrays, but you can use vectors (dynamic arrays)! Example with vector:
Tumblr media
Quick Tip: Arrays Can Store Anything 🤯
You can store numbers, booleans, objects (structures/classes), and even arrays inside arrays (multidimensional arrays).
Example:
Tumblr media
Real-World Example 🌍
A To-Do list:
Tumblr media
Output:
Tumblr media
👏 See how clean and readable that is compared to hardcoding every single task?
🌟 Final Thoughts
Arrays are the foundation of so much you'll do in coding — from simple projects to complex apps. Master them early, and you'll thank yourself later!
🌱 Start practicing:
Make a list of your favorite movies
Your favorite foods
Songs you love
...all in an array!
If you liked this C++ explainer, let’s connect! 💬✨ Happy coding, coder fam! 💻🌈
2 notes · View notes
haika-98 · 1 year ago
Photo
Tumblr media
Phone Wallpaper - Lex Ask Me Shirt
A phone wallpaper I made for my boyfriend when we started dating back in 2018 before he was a border collie.
Posted using PostyBirb
2 notes · View notes
machinelearningsite · 1 year ago
Text
1/100 Days of C++: Introduction to Compiler, Linker, and Libraries
Hello reader, welcome to 100 Days of C++ series. In my previous post on 4 Main Reasons Why I am moving to C++ from Python, I expressed my views on how C++ programming language is more convenient for me as an automobile engineer. Not that Python is bad, I am still a fan of Python. But when you need a real-time execution, when a delay of a few hundred milliseconds is of drastic significance, C++ is…
Tumblr media
View On WordPress
1 note · View note
cl0ckworkpuppet · 2 years ago
Text
Tumblr media
something i made in a fit of rage remembering that c++ is a real language
5 notes · View notes
maxacoda · 2 years ago
Text
Entry one: A refreashers in code
Hello I am Maxa Coda,
This is a journal of my progress relearning to code. Today I started from scratch learning C++. Thought I have do coding with C++ before and even made some applications with it. However afer yonks of not pratice and kinda forgetting some thew stuff I originally learnt I thought it would be a good idea to have a refeasher.
So I made so very basic console apps even with some user inputs.
Tumblr media Tumblr media Tumblr media
So why I'm doing this? I want to work towards making my own simple game/application and not only upskill but also improve my current skillset.
Do I have a plan/project in mind? I do want to make a game, got a 2D side scroller in mind however one step at a time. I might do a few non game projects first. Will update as we go.
Signing off,
Maxa Coda
4 notes · View notes
code-recipe · 2 years ago
Text
Tumblr media
Google Interview Question Revealed!
Checkout our latest video where we have explained the popular Google, Microsoft, Facebook, Amazon interview question "Two Sum" in a simple, step by step and easy to understand way. Watch it now on YouTube : https://youtu.be/JMCTsP0Jxmc
2 notes · View notes
tpointtech1 · 17 days ago
Text
How do you use if, else, and switch in C++?
Learn how to use if, else, and switch statements in C++ to control program flow with conditions and choices. Master decision-making in C++ now!
0 notes