Welcome to Incels.is - Involuntary Celibate Forum

Welcome! This is a forum for involuntary celibates: people who lack a significant other. Are you lonely and wish you had someone in your life? You're not alone! Join our forum and talk to people just like you.

It's Over teaching myself how to program again

Programming is pretty cool.
If you save a Notepad file as .exe instead of .txt you can start making something.
 
practicing on passing a pointer that accesses a vectorized array in main() from the void function and using it to swap two variables

Code:
#include <iostream>
#include <vector>
using namespace std;

//assignment: make a vectorized array in main(), make a function that passes a pointer var and two integer vars
//in which you'll use to swap two elements ( element no.2 and element no.4) in the vectorized array


void swapper (vector<int> *ptr, int x, int y)
{

    int temp       = (*ptr)[x];
    (*ptr)[x]      = (*ptr)[y];
    (*ptr)[y]      = temp;




}

int main(int argc, char** argv) {

//vectorized init and input
int max2;
   
cout << "hey ! welcome to svg's vectorized array pointer swapper" << endl;
cout << "enter your array's size number or the maximum number of numbers in array" << endl;
cin >> max2;

vector<int> ar2(max2);

for (int b = 0; b < max2; b++) {
    cout << "enter element number " << b << ": ";
    cin >> ar2[b];
}

vector<int> *ptr1 = &ar2;


int x = 2;
int y = 4;


swapper (ptr1, x, y);



for (int b = 0; b < max2; b++) {
    cout << "element number " << b << " is " << ar2[b] << endl;
}



    return 0;

this shit is mind-raping :dafuckfeels: :dafuckfeels: :dafuckfeels:
Memory is the only hard thing to learn about in C++.
 
Memory is the only hard thing to learn about in C++.
sadly Ion fuck with data structure my nigga, I would probably need a separate data structure course later :cryfeels:
 
9.Vectorized pointer array swap

it became a bit more tolerable and even the code was optimized and became smaller, still pretty much mindfucking.

bear in mind we haven't reached the true mindfucking stage of oop with cons and des and inherits.


 

Attachments

  • vectorized pointer array swapper.txt
    1 KB · Views: 5
10.introduction into structs and vectorized structs/vectorized variables

caution: intense mindfucking and complexity
keep in mind that after all the commentary included, I still needed an ai to write me the code itself, as the source material which I used was insufficient because I was stuck in this concept for two days.



and even with all these comments, I can still barely understand or have a grasp of the logic regarding this program
I needed to practice and re-write the program myself with tons of commentary to understand the whats and whys

terry davis is like "nothing ever happens" chud, everyday I dive in programming logic concepts, his views become more valid


that is because c++ is a malignent tumor of a programming language made for fags for putting me in such mindfuck, you don't need anything more than c or assembly.
 

Attachments

  • vectorized struct.txt
    2.6 KB · Views: 5
Last edited:
11.a regular struct with getline operator

just a regular struct exercise to strengthen one's grasping of how struct works after the previous hellhole of a piece of code.
it also includes a better method for string/text data entry by the user which is getline(cin>>ws,var) which can skip spaces and allows the user to input statements with spacing unlike the regular cin method.
 

Attachments

  • basic struct + getline operator.txt
    795 bytes · Views: 5
Oversaturated industry. Average people should either get on welfare or join a terror group. The job market is done for good.
 
Oversaturated industry. Average people should either get on welfare or join a terror group. The job market is done for good.
if this fails I will apply for a welfare check to neet and rot.
right now it's hard for me to apply I have to have a handicap or someone handicapped in the house to take care of.

if that fails as well then I will find a way even if it costs me cutting a limb by myself to apply to the check then neet and rot peacefully at home
 
11.a regular struct with getline operator

just a regular struct exercise to strengthen one's grasping of how struct works after the previous hellhole of a piece of code.
it also includes a better method for string/text data entry by the user which is getline(cin>>ws,var) which can skip spaces and allows the user to input statements with spacing unlike the regular cin method.
even regular fucking c sucks

this whole struct shit is fucking ass tbh
Idk why these niggers insist on complicating shit
 
man I wish I was just a civil engineer or someshit
this shit fucking sucks big negroe balls
Only now I know why computer programmers are often associated with being gay or tranny, you can't have this level of masochism unless you like getting pounded in the ass like a fsg
 
12.functional structs

from this point forward it'll keep getting worse, you'll need the patience of noah or christ to pull through such bs logic

next we'll have a gigantic code employing functions, structs, pointers, arrays and even validation checks, all fucking vectorized to wrap this bs logic up.

if I don't succeed in this next exercise I will never be able to wrap my knowlegde around these bs topics completely before oop
:fuk:
or proceed to to learn 3dd arrays first, then proceed with that exercise I mentioned earlier
 

Attachments

  • functional structs.txt
    2 KB · Views: 11
Last edited:
Keep up the good work!
 
You're very intelligent. I'm not. However, I'd like to learn C instead as I want to make my own plugins for The Sims 3.
 
You're very intelligent. I'm not. However, I'd like to learn C instead as I want to make my own plugins for The Sims 3.
thanks and you're better off learning c tbh, you would still face 70% of the challenges c++ give you like struct and memory, however you willl not bother yourself with more bs logic like oop and referencing.

If I started this journey with c, at my current progress I would have finished 50-60% of mastering the language with only 40% remaining, but in c++ I still have oop to learn which makes me at 30-35% right now
 
13.functional and vectorized 3d array

before you lash at me after seeing the code, hear me out: it's easier than the ones before it and it's really easy.

the entire concept boils down to two or three things:
1.declaring and vectorizing a multi dimensional array format : just practice it a couple of time and it'll be engraved in your mind.
2.more inner loops for more dimensions

3.referencing a vectorized multi-dim array in a function is different just like a single dim array


if you want to fully grasp arrays by themselves, this code will do it for you better than anything before.
 

Attachments

  • function-vectorized 3d array.txt
    2.2 KB · Views: 5
14.Arrayed structs

this is getting easier, just mixing struct with array by using array as a method of input and output, imo? this is much easier than a vectorized struct.

an arrayed struct doesn't need push_back, doesn't even need the temporary newvar variable, it is both by it's own.
 

Attachments

  • array structs.txt
    1.1 KB · Views: 4
14.a Vectorized array struct + vectorized struct w/ function exercise

after 4 days of taking time to fix shit on my linux fedora (like audio and such, still couldn't get it working the way I like) I finally came back to practice programming, I shit you not I could barely remember shit so I made myself a simple exercise since I was already weak in structs and employed basic void function + vectorized array struct as an alt method to use structs instead of using vector + pushback (you can see it in the second function).

Next I'll be working on the one for all code, which will employ pointer, array, struct, function with vectorizing :fuk:
 

Attachments

  • vectorized array struct + vectorized struct + function.txt
    2.6 KB · Views: 6
You could try solving Leetcode problems
 
You could try solving Leetcode problems
HELL no man I don't want to fuck myself over an assignment or tutoring made by someone else
I want to explore , create my own problems and make their solution all by myself to get a solid foundation
 
Next I'll be working on the one for all code, which will employ pointer, array, struct, function with vectorizing :fuk:
this idea is scrapped from my lists. it's just too much... WAYYY too much, I think I'll ask ai to write such bs later when I want to review such concepts but I don't have the mental capacity to handle all the rage that I'm going to endure while coding such bs

also if I keep strengthening myself to such level at every concept the pace will be extremely slow

moving to file I/O now :feelscomfy:
 
I'm fucking retarded :feelsokman:
 
15.File I/O: introduction and writing from a struct

plenty of explanation in the file, imployed a mini validation check for pagecount which can be useful for integer variables.
 

Attachments

  • file io + structs.txt
    2.4 KB · Views: 6
I'm fucking retarded :feelsokman:
I thought I deleted the vscode directory which stored all the codes I've written so far luckily it wasn't the case :feelsautistic:
 
15.File I/O: introduction and writing from a struct

plenty of explanation in the file, imployed a mini validation check for pagecount which can be useful for integer variables.
holy fucking shit :fuk:

turns out that reading the text into strings from the file then segmenting the lines (strings) into vars then loading these vars in a vectorized struct was one of the hardest shit I ever encountered on c++


what the actual fuck nigga this shit is so difficult even ai barely could do it

I'll practice on writing for this upcoming code from scratch to memorize all the shit being used, before I drop it here as 16.
 
16. file input into a vectorized struct and output in a vectorized struct

apologies for the absence but I just became a lazy nigga and took another vacation, maybe I'm losing commitment? :feelscomfy: I'm just too easily distracted

this one is different and I feel like it worths to be a lesson on it's own, it prompts the user to input a dynamic struct, stores the struct in a file and then reads from the file and outputs it from another struct by string splitting via stringstream and auto trim, one must learn those to get a great grip on io handling
 

Attachments

  • file io read write into struct.txt
    4 KB · Views: 4
next one is going to be about search, edit and replace vector structs content in a file

my brain is too fucking bricked atm and still feel lagging from the 4 day break idk if I can do it today tbh :fuk:

but if I did we'll move to oop programming tomorrow :feelsseriously:
 
so far I've finished almost 50% of my c++ journey, I am convinced that these lessons will make anyone godtier for operators and basic logic of the language (which is 50% of it), tomorrow we will start with the second half of the course, oop and later full scale projects

thus hereby and so far, I present you my magnum opus..
17. file io + search + edit + apply edit


After 5 hours of coding and a whole day of conversing with gay-i to optimize the code (even though it did function correctly before) I finally present you the last of my fruits regarding the first non-oop half of an entire programming language,

Do I consider uploading these as a FOSS course on github?
may b, but I'm too lazy to do so tbh and I find it more amusing here for some reason :feelscomfy:
I don't seek recognition or hope that this gains recognition or blows up as a course, this thread is more like a blog to document one's journey in programming.

throughout those 17-20 exercises I faced lots of logic puzzles here and stupid self-made mistakes there as well as deadends and gay-i giving me some shitty concepts to apply as an assignment, however the problem solving that worked made me feel good about myself, some instances which I solved made me think "damn I really figured that on my own? I can't be this smart!" so becoming your own tutor is a journey of discovering yourself and your capabilities. it really fits better than letting others guide you because your progress will be based on how your brain works and your thought process and it can be satisfying at times as well as the fact that you're gaining a profitable skill.
that being said, c++ is still a garbage programming language and you don't need anything newer or more complex than C (imo)

sorry for sperging out this much, I hope I come back tomorrow with a lesson about oop :feelsokman:
 

Attachments

  • struct io to file + search + edit.txt
    3.8 KB · Views: 3
I'll go back to learning Lua so I can script on Roblox
 
You should be learning JavaScript instead so that you can postmaxx on obscure forums.
 

Similar threads

svgmn1
Replies
20
Views
1K
Cryotron
Cryotron
sennaGTR
Replies
16
Views
1K
Biowaste Removal
Biowaste Removal
E
Replies
88
Views
6K
ldargoblin
ldargoblin

Users who are viewing this thread

shape1
shape2
shape3
shape4
shape5
shape6
Back
Top