#IOstream
Explore tagged Tumblr posts
fortunatelycoldengineer · 2 years ago
Text
Tumblr media
What are autoboxing and unboxing? . . . . For more questions about Java https://bit.ly/3kw8py6 Check the above link
2 notes · View notes
tinchicus · 7 months ago
Text
C++ / iostream
Hoy veremos un poco mas sobre la librreria estandar de C++ para poder utilizar nuestros codigos. Espero les sea de utilidad!
Bienvenidos sean a este post, hoy ahondaremos un poco mas sobre esta libreria. Si vienen de los posts anteriores, habran notado que siempre utilizamos esta libreria para nuestros codigos. Dado que la misma nos permitira manejar todos los elementos de entrada/salida. Nos permite utilizar un monton de herramientas pero las que mas hemos usado fueron cout y cin. Siendo el primero para mostrar…
0 notes
kairosthegoat · 10 months ago
Text
My neovim just will not allow c++
C is fine but we draw the line at c++
0 notes
mommygyno · 2 months ago
Text
#include <iostream>
using namespace std;
int main() {
cout << "I love my husband.";
}
18 notes · View notes
q4os-tde-official · 5 months ago
Text
okay i got a hello world script open in code::blocks and i am very lost
Tumblr media
what does any of that even mean??? the fuck is a cout? what's a namespace? what does int mean in this context if not integer like in python? what is an iostream?
23 notes · View notes
faretheeoscar · 1 year ago
Text
(143)
Pairing: Nathan Bateman x gn!reader
--Warnings: Nothing more than Nathan being a pain in the ass and some sexual innuendos, fluff by Nathan standards--
Also this drabble is so very nerdish from my part, it started as a blurb in my head when I started learning coding lol
A/N: English is not my first language so I'm sorry if there’s any mistakes.
Word count: 600~
Dividers source: animatedglittergraphics-n-more
Tumblr media
Blue is reader
Green is Nathan
Tumblr media
#include <iostream>
int main() {
    std::cout << "// You work so fucking hard. Lunch?"
    std::cout << "// Nathan, seriously? You hacked into my work just to ask me out?"
    std::cout << "// Not hacking if it's my own software"
    std::cout << "// Whatever, I’m busy" << std::endl;
changeText.addEventListener("click", function() {
  changeText.textContent = "Text has been changed!";
});
    std::cout << "// Come on!"
changeText.addEventListener("click", function() {
 override
changeText.addEventListener("click", function() {
  changeText.textContent = "Text has been changed!";
});
    std::cout << "// Nathan, STOP disrupting my work, please?"
    std::cout << "// I will stop if you have lunch with me"
    std::cout << "// Not gonna even entertain you, I have a lot of things to work on and I have to finish them quickly"
    std::cout << "// You need to stop being so stubborn btw... you’re too tense... you’re gonna have an aneurysm or something if you don’t take a break...and have lunch with me?"
    std::cout << "// NO, let-me-work!!" << std::endl;
Tumblr media
    std::cout << "C:\\Users\\Bluebook\\Documents> del \"code_file.txt\"" << std::endl;
    std::cout << "Are you sure (Y/N)?" << std::endl;
    std::cout << "Y:" << std::endl;
    std::cout << "C:\\Users\\Bluebook\\Documents> del \"code_file.txt\" Successfully deleted"
    std::cout << "// DID YOU SERIOUSLY DELETED ALL MY WORK OUT OF SPITE?"
    std::cout << "// Not spite, you needed a break. Now you have one."
    std::cout << "// Unbelievable"
    std::cout << "// Now, lunch?"
    std::cout << "// No, fuck you"
    std::cout << "// Tempting..."
    std::cout << "// ..."
    std::cout << "// 0——->"
.
.
.
   std::cout << "// That was a dick btw"
    std::cout << "// I’m actually quitting now for real…"
    std::cout << "// Like hell you are…"
    std::cout << "// Come on, don't be so sensitive, Jesus Christ" ;
    std::cout << "// You just deleted all my week’s worth job .l. "
    std::cout << "// Stop moping about it, I have a backup"
    std::cout << "// Then restore it" << std::endl;
    std::cout << "// Not until you have lunch with me."
    std::cout << "// I'm calling the chopper and packing my things…"
    std::cout << "// WAIT, fine! I’ll reinstate the code… you big baby."
    std::cout << "// I was just joking, ffs" << std::endl;
Tumblr media
 
   std::cout << "C:\\Windows\\System32\\Bluebook\\Documents> rstrui.exe" << std::endl;
    std::cout << "Files successfully restored"
    std::cout << "// Happy now?"
    std::cout << "// Asshole."
    std::cout << "// Is that an invite or a statement?"
    std::cout << "// Take a wild guess."
    std::cout << "// Worth the try…"
    std::cout << "// Now, are we done with your temper tantrum? Can we eat now?"
    std::cout << "// I can’t stand you..."
    std::cout << "// So is that code for Italian or sushi?"
    std::cout << "// Sushi..."
    std::cout << "// I'll tell the droids to start preparing it then"
    std::cout << "// Okay, I’ll be down in 5 minutes just don't fuck with my work again?"
    std::cout << "// I promise, but only if you let me fuck with something else later ;)"
    std::cout << "// Fine…"
    std::cout << "// Can you indulge me in something else?"
    std::cout << "// You’re really testing me here"
    std::cout << "// For science?"
    std::cout << "// Be the sushi table?"
    std::cout << "// I’ll go get undressed…"
    std::cout << "// Fuck yeah! (143) <3 ."
    std::cout << "// I love you too" << std::endl;
    std::cout << "C:\\Windows\\System32\\Bluebook\\Documents> Save" << std::endl;
    return 0;
}
Tumblr media
143 in coding means “I love you” btw <3
Reblogs and comments are kindly appreciated!
Join the TagList!
Main Masterlist
Fics Masterlist
56 notes · View notes
smokin-salmon · 2 months ago
Note
Include <iostream>
using namespace std;
int main()
{
str Answer = '0';
cout << "Would you like to ask Smokin Salmon a question? \n" << "y for yes \n" << "n for no \n";
cin >> Answer;
if (Answer='y')
{
cout << "How do you feel about green beans?";
}
else
{
cout << "AAAAAAAAAAAAAAAAAAAAAAAAAA";
}
--------------------------------------------------------------
Would you like to ask Smokin Salmon a question?
y for yes
n for no
Y
How do you feel about green beans?
They're good with mashed potatoes.
4 notes · View notes
carouselintothegrave · 9 months ago
Text
Shall Find Olympus: A C++ poem
Wrote it when I was bored during a lab one day. You enter a character and you get the count of how many characters pre-specified string contains (obviously it compiles) (good god was this a pain to paste and format here)
#include <iostream> #define up int #define find char #define take std::cin #define let for #define Hermes ( #define carry auto #define unto : #define in == #define there if #define is ( #define skies 0 #define we ++ #define to std::cout #define soar << #define the = #define rise ; #define Shall const #define awaits main #define O } #define come ) #define then {
Shall find Olympus[] = "Let's count letter occurrences in this string"; up awaits Hermes come then find me = ' '; take >> me; up above the skies; let Hermes carry us unto Olympus) { there is me in us) above we rise O to soar above; }
7 notes · View notes
digitaldetoxworld · 1 month ago
Text
C++ Programming Language – A Detailed Overview
 C++ is a effective, high-overall performance programming language advanced as an extension of the C language. Created via Bjarne Stroustrup at Bell Labs in the early Eighties, C++ delivered object-orientated features to the procedural shape of C, making it appropriate for large-scale software program development. Over the years, it has emerge as a extensively used language for machine/software program improvement, game programming, embedded systems, real-time simulations, and extra.
C ++ Online Compliers 
Tumblr media
C++ combines the efficiency and manage of C with functions like classes, items, inheritance, and polymorphism, permitting builders to construct complex, scalable programs.
2. Key Features of C++
Object-Oriented: C++ supports object-orientated programming (OOP), which include encapsulation, inheritance, and polymorphism.
Compiled Language: Programs are compiled to machine code for overall performance and portability.
Platform Independent (with Compiler Support): Though not inherently platform-unbiased, C++ programs can run on a couple of structures when compiled therefore.
Low-Level Manipulation: Like C, C++ permits direct reminiscence get right of entry to thru suggestions.
Standard Template Library (STL): C++ consists of powerful libraries for facts systems and algorithms.
Rich Functionality: Supports functions like feature overloading, operator overloading, templates, and exception dealing with.
3. Structure of a C++ Program
Here’s a primary C++ program:
cpp
Copy
Edit
#encompass <iostream>
the use of namespace std;
int important() 
    cout << "Hello, World!" << endl;
    return zero;
Explanation:
#encompass <iostream> consists of the enter/output stream library.
Using namespace std; allows using standard capabilities like cout without prefixing std::.
Foremost() is the access point of every C++ program.
Cout prints textual content to the console.
Four. Data Types and Variables
C++ has both primitive and user-defined statistics types. Examples:
cpp
Copy
Edit
int a = 10;
glide b = 3.14;
char c = 'A';
bool isReady = true;
Modifiers like short, lengthy, signed, and unsigned extend the information sorts’ range.
5. Operators
C++ supports, !
Assignment Operators: =, +=, -=, and many others.
Increment/Decrement: ++, --
Bitwise Operators: &, 
    cout << "a is greater";
 else 
    cout << "b is extra";
Switch Case:
cpp
Copy
Edit
transfer (desire) 
    case 1: cout << "One"; ruin;
    case 2: cout << "Two"; smash;
    default: cout << "Other";
Loops:
For Loop:
cpp
Copy
Edit
for (int i = zero; i < five; i++) 
    cout << i << " ";
While Loop:
cpp
Copy
Edit
int i = 0;
at the same time as (i < five) 
    cout << i << " ";
    i++;
Do-While Loop:
cpp
Copy
Edit
int i = zero;
do 
 cout << i << " ";
    i++;
 whilst (i < 5);
7. Functions
Functions in C++ growth modularity and reusability.
Cpp
Copy
Edit
int upload(int a, int b) 
    go back a + b;
int major() 
    cout << upload(three, 4);
    return 0;
Functions may be overloaded via defining multiple variations with special parameters.
Eight. Object-Oriented Programming (OOP)
OOP is a chief energy of C++. It makes use of instructions and objects to represent real-international entities.
Class and Object Example:
cpp
Copy
Edit
magnificence Car 
public:
    string logo;
    int pace;
void display() 
        cout << brand << " velocity: " << pace << " km/h" << endl;
    int main() 
    Car myCar;
    myCar.Emblem = "Toyota";
    myCar.Pace = 120;
    myCar.Show();
    go back zero;
9. OOP Principles
1. Encapsulation:
Binding facts and features into a unmarried unit (elegance) and proscribing get admission to the usage of private, public, or blanketed.
2. Inheritance:
Allows one magnificence to inherit properties from another.
Cpp
Copy
Edit
elegance Animal 
public:
    void talk()  cout << "Animal sound" << endl; 
;
class Dog : public Animal 
public:
    void bark()  cout << "Dog barks" << endl; 
; three. Polymorphism:
Same characteristic behaves in a different way primarily based at the item or input.
Function Overloading: Same feature name, special parameters.
Function Overriding: Redefining base magnificence method in derived magnificence.
Four. Abstraction:
Hiding complicated information and showing handiest vital capabilities the usage of training and interfaces (abstract training).
10. Constructors and Destructors
Constructor: Special approach known as while an item is created.
Destructor: Called whilst an item is destroyed.
Cpp
Copy
Edit
magnificence Demo 
public:
    Demo() 
        cout << "Constructor calledn";
    ~Demo() 
        cout << "Destructor calledn";
    ;
11. Pointers and Dynamic Memory
C++ supports tips like C, and dynamic memory with new and delete.
Cpp
Copy
Edit
int* ptr = new int;   // allocate reminiscence
*ptr = 5;
delete ptr;           // deallocate memory
12. Arrays and Strings
cpp
Copy
Edit
int nums[5] = 1, 2, three, 4, 5;
cout << nums[2];  // prints 3
string name = "Alice";
cout << call.Period();
C++ also supports STL boxes like vector, map, set, and many others.
Thirteen. Standard Template Library (STL)
STL offers established training and features:
cpp
Copy
Edit
#consist of <vector>
#consist of <iostream>
using namespace std;
int important() 
    vector<int> v = 1, 2, 3;
    v.Push_back(four);
    for (int i : v)
        cout << i << " ";
STL includes:
Containers: vector, list, set, map
Algorithms: sort, discover, rely
Iterators: for traversing containers
14. Exception Handling
cpp
Copy
Edit
attempt 
    int a = 10, b = 0;
    if (b == zero) throw "Division by means of 0!";
    cout << a / b;
 seize (const char* msg) 
    cout << "Error: " << msg;
Use attempt, capture, and throw for managing runtime errors.
15. File Handling
cpp
Copy
Edit
#consist of <fstream>
ofstream out("information.Txt");
out << "Hello File";
out.Near();
ifstream in("records.Txt");
string line;
getline(in, line);
cout << line;
in.Near();
File I/O is achieved the usage of ifstream, ofstream, and fstream.
16. Applications of C++
Game Development: Unreal Engine is primarily based on C++.
System Software: Operating systems, compilers.
GUI Applications: Desktop software (e.G., Adobe merchandise).
Embedded Systems: Hardware-level applications.
Banking and Finance Software: High-speed buying and selling systems.
Real-Time Systems: Simulations, robotics, and so on.
17. Advantages of C++
Fast and efficient
Wide range of libraries
Suitable for each high-level and low-level programming
Strong item-orientated aid
Multi-paradigm: procedural + object-oriented
18. Limitations of C++
Manual reminiscence management can lead to mistakes
Lacks contemporary protection functions (in contrast to Java or Python)
Steeper studying curve for beginners
No built-in rubbish series
19. Modern C++ (C++11/14/17/20/23)
Modern C++ variations introduced capabilities like:
Smart recommendations (shared_ptr, unique_ptr)
Lambda expressions
Range-based totally for loops
car kind deduction
Multithreading support
Example:
cpp
Copy
Edit
vector<int> v = 1, 2, three;
for (auto x : v) 
    cout << x << " ";
 C++ is a effective, high-overall performance programming language advanced as an extension of the C language. Created via Bjarne Stroustrup at Bell Labs in the early Eighties, C++ delivered object-orientated features to the procedural shape of C, making it appropriate for large-scale software program development. Over the years, it has emerge as a extensively used language for machine/software program improvement, game programming, embedded systems, real-time simulations, and extra.
C ++ Online Compliers 
C++ combines the efficiency and manage of C with functions like classes, items, inheritance, and polymorphism, permitting builders to construct complex, scalable programs.
2. Key Features of C++
Object-Oriented: C++ supports object-orientated programming (OOP), which include encapsulation, inheritance, and polymorphism.
Compiled Language: Programs are compiled to machine code for overall performance and portability.
Platform Independent (with Compiler Support): Though not inherently platform-unbiased, C++ programs can run on a couple of structures when compiled therefore.
Low-Level Manipulation: Like C, C++ permits direct reminiscence get right of entry to thru suggestions.
Standard Template Library (STL): C++ consists of powerful libraries for facts systems and algorithms.
Rich Functionality: Supports functions like feature overloading, operator overloading, templates, and exception dealing with.
3. Structure of a C++ Program
Here’s a primary C++ program:
cpp
Copy
Edit
#encompass <iostream>
the use of namespace std;
int important() 
    cout << "Hello, World!" << endl;
    return zero;
Explanation:
#encompass <iostream> consists of the enter/output stream library.
Using namespace std; allows using standard capabilities like cout without prefixing std::.
Foremost() is the access point of every C++ program.
Cout prints textual content to the console.
Four. Data Types and Variables
C++ has both primitive and user-defined statistics types. Examples:
cpp
Copy
Edit
int a = 10;
glide b = 3.14;
char c = 'A';
bool isReady = true;
Modifiers like short, lengthy, signed, and unsigned extend the information sorts’ range.
5. Operators
C++ supports, !
Assignment Operators: =, +=, -=, and many others.
Increment/Decrement: ++, --
Bitwise Operators: &, 
    cout << "a is greater";
 else 
    cout << "b is extra";
Switch Case:
cpp
Copy
Edit
transfer (desire) 
    case 1: cout << "One"; ruin;
    case 2: cout << "Two"; smash;
    default: cout << "Other";
Loops:
For Loop:
cpp
Copy
Edit
for (int i = zero; i < five; i++) 
    cout << i << " ";
While Loop:
cpp
Copy
Edit
int i = 0;
at the same time as (i < five) 
    cout << i << " ";
    i++;
Do-While Loop:
cpp
Copy
Edit
int i = zero;
do 
 cout << i << " ";
    i++;
 whilst (i < 5);
7. Functions
Functions in C++ growth modularity and reusability.
Cpp
Copy
Edit
int upload(int a, int b) 
    go back a + b;
int major() 
    cout << upload(three, 4);
    return 0;
Functions may be overloaded via defining multiple variations with special parameters.
Eight. Object-Oriented Programming (OOP)
OOP is a chief energy of C++. It makes use of instructions and objects to represent real-international entities.
Class and Object Example:
cpp
Copy
Edit
magnificence Car 
public:
    string logo;
    int pace;
void display() 
        cout << brand << " velocity: " << pace << " km/h" << endl;
    int main() 
    Car myCar;
    myCar.Emblem = "Toyota";
    myCar.Pace = 120;
    myCar.Show();
    go back zero;
9. OOP Principles
1. Encapsulation:
Binding facts and features into a unmarried unit (elegance) and proscribing get admission to the usage of private, public, or blanketed.
2. Inheritance:
Allows one magnificence to inherit properties from another.
Cpp
Copy
Edit
elegance Animal 
public:
    void talk()  cout << "Animal sound" << endl; 
;
class Dog : public Animal 
public:
    void bark()  cout << "Dog barks" << endl; 
; three. Polymorphism:
Same characteristic behaves in a different way primarily based at the item or input.
Function Overloading: Same feature name, special parameters.
Function Overriding: Redefining base magnificence method in derived magnificence.
Four. Abstraction:
Hiding complicated information and showing handiest vital capabilities the usage of training and interfaces (abstract training).
10. Constructors and Destructors
Constructor: Special approach known as while an item is created.
Destructor: Called whilst an item is destroyed.
Cpp
Copy
Edit
magnificence Demo 
public:
    Demo() 
        cout << "Constructor calledn";
    ~Demo() 
        cout << "Destructor calledn";
    ;
11. Pointers and Dynamic Memory
C++ supports tips like C, and dynamic memory with new and delete.
Cpp
Copy
Edit
int* ptr = new int;   // allocate reminiscence
*ptr = 5;
delete ptr;           // deallocate memory
12. Arrays and Strings
cpp
Copy
Edit
int nums[5] = 1, 2, three, 4, 5;
cout << nums[2];  // prints 3
string name = "Alice";
cout << call.Period();
C++ also supports STL boxes like vector, map, set, and many others.
Thirteen. Standard Template Library (STL)
STL offers established training and features:
cpp
Copy
Edit
#consist of <vector>
#consist of <iostream>
using namespace std;
int important() 
    vector<int> v = 1, 2, 3;
    v.Push_back(four);
    for (int i : v)
        cout << i << " ";
STL includes:
Containers: vector, list, set, map
Algorithms: sort, discover, rely
Iterators: for traversing containers
14. Exception Handling
cpp
Copy
Edit
attempt 
    int a = 10, b = 0;
    if (b == zero) throw "Division by means of 0!";
    cout << a / b;
 seize (const char* msg) 
    cout << "Error: " << msg;
Use attempt, capture, and throw for managing runtime errors.
15. File Handling
cpp
Copy
Edit
#consist of <fstream>
ofstream out("information.Txt");
out << "Hello File";
out.Near();
ifstream in("records.Txt");
string line;
getline(in, line);
cout << line;
in.Near();
File I/O is achieved the usage of ifstream, ofstream, and fstream.
16. Applications of C++
Game Development: Unreal Engine is primarily based on C++.
System Software: Operating systems, compilers.
GUI Applications: Desktop software (e.G., Adobe merchandise).
Embedded Systems: Hardware-level applications.
Banking and Finance Software: High-speed buying and selling systems.
Real-Time Systems: Simulations, robotics, and so on.
17. Advantages of C++
Fast and efficient
Wide range of libraries
Suitable for each high-level and low-level programming
Strong item-orientated aid
Multi-paradigm: procedural + object-oriented
18. Limitations of C++
Manual reminiscence management can lead to mistakes
Lacks contemporary protection functions (in contrast to Java or Python)
Steeper studying curve for beginners
No built-in rubbish series
19. Modern C++ (C++11/14/17/20/23)
Modern C++ variations introduced capabilities like:
Smart recommendations (shared_ptr, unique_ptr)
Lambda expressions
Range-based totally for loops
car kind deduction
Multithreading support
Example:
cpp
Copy
Edit
vector<int> v = 1, 2, three;
for (auto x : v) 
    cout << x << " ";
C Lanugage Compliers 
2 notes · View notes
miquerinus · 2 years ago
Text
Tumblr media
Day 1 - 100 days of code C++
Tumblr media
Observations
#include
It means that we are calling a library of the language, that is, we are calling some resource whose purpose is to help in some action that our code is doing, in this case, we are calling this library to print our screen output - hello world - via * std::cout*.
int main()
This is the main function of the language, that is, our program does not exist if there is no main function. The parentheses are used to pass a parameter, in this case we are not passing any.
{}
The keys are the representation of where our code will be executed, therefore it delimits the execution block, even calling other functions or executing something simpler, however being within these delimiters.
std::cout
This is our command responsible for calling the c++ language standard library that works with data input and output - iostream. Without this command we would not be able to print an output on screen.
std::endl
If you stick to STD::, this means that STD is an abbreviation of the word STANDARD, that is, it is an abbreviation that references the C++ Standard library / directive - iostream. Its purpose is to make a line break, that is, when you finish executing the command, the cursor goes to a new line. The letter "\n" does the same thing, I used it because it is a simpler language syntax.
return()
Return(0) means that, if our program does not present any syntax errors, it will not return any errors, thus ending our program properly.
Conclusion
As we observed, C++ is an apparently simple language, it has a concise syntax, for me, for the time being, it did not present major problems, since, as far as I could see, it shares characteristics of other languages ​​that I had the opportunity to have contact with until then. Next day, I want to get into the subject of variables and their types.
47 notes · View notes
fortunatelycoldengineer · 2 years ago
Text
Tumblr media
What is a heavyweight component? . . . . For more questions about Java https://bit.ly/3kw8py6 Check the above link
0 notes
bobalicious6565 · 3 months ago
Text
~◇ Introduction
#include <iostream>
using namespace std;
int main(){
Greetings all! I am Boba and an artist in learning. I go by she/her, but I do not mind they/them. I usually post oc art and lore!
I am a minor and aroace. Therefore, I would appreciate it if sexual jokes are not made! I also do not take in commissions.
string my_interests[14] = {"Moriarty the Patriot", "Omniscient Reader Viewpoint", "Bungo Stray Dogs", "Twisted Wonderland", "Ever After High", "OCs", "Alien Stage", "Reverse 1999", "Arcana Twilight", "Arcane", "otome games", "Epic the Musical", "Nijisanji EN", "Black Butler"}
(You can find me on){
Discord and Tiktok, both under the name Bobalicious_6565!
}
return 0;
}
3 notes · View notes
nhaneh · 1 year ago
Text
I think a lot sometimes about the pushback against the concept of talent within arts and I mean yeah on some level I get it, but also the suggestion that anyone can learn to draw is, to me, like saying anyone can learn to program.
like yes, sure, at the end of the day just about anyone can likely find some way of forming vague scribbles using their tool or input peripheral of choice, but that's basically like saying just about anyone can find ways of writing semicolons and the words if, then, else on some kind of digital computer - the difficulty was never in achieving the most basic and abstracted interpretation of the act, but in an understanding of how your actions translate into the kind of end result that you want.
in programming, the most basic starter program that nearly every extremely basic example or tutorial will start with is called Hello World, which is simply a program that prints or otherwise displays the text Hello World to the user.
#include <iostream>
in python, this can be done with a single line of code, like so:
print("Hello World!")
while in C++, that same program will take a bit more work:
#include <iostream>
int main()
{
std::cout << "Hello World!\n";
return 0;
}
Now if you have the ability to copy that text into a file then congratulations, you have the ability to write a program! But, obviously, to really do any actual programming, you kind of need to know what any of the above actually means and what it makes the computer actually do.
This by the way is why the "Learn to Code" kind of initiatives tend not to work out very well, because while technically anyone can write code, actually understanding how to code is a much more complicated affair that can't necessarily be directly taught - it's something that has to be understood.
What is needed, basically, is a system - a kind of mental library of symbols and concepts that you can rearrange and reassemble in various ways to reach a particular solution; a point where you can break down a larger problem into a bunch of much smaller, more individualised problems that are easier to solve one by one.
This is basically how expertise works - whether consciously or (much more often!) not, you form models and systems in your head to let you simplify and, to an extent, automate otherwise complex tasks. If you've ever looked at something and just felt this feeling of "aha, I see how this works", then you should technically already know what I'm talking about.
And look, this is not an argument against practice - expertise takes work, it takes training and experience and gradually discovering ways in which things start making sense to you, even those things that you might have an intuitive knack for. However, what I do think is that telling people who say they can't draw to "just draw anyway" is a lot like, and just as dismissive as, "Learn to Code" because, just like how saying "I don't know how to code" generally is not meant to be understood as "I am physically unable to write words into a text document", saying "I can't draw" typically does not mean being physically unable to form lines or shapes on paper or in a digital image or whatever. Rather, it's a statement about being unable to break down the problem of how to reach a desired end result into smaller, manageable steps that you are able to grasp. And, much like with programming, not everyone will have an eye, or a mind, for it: just like some people struggle with spelling or mathematics or, indeed, code, some people also struggle with colour or perspective or object shape or lighting and shading. And, by contrast, for some people these things also come much more easily and naturally than others.
Not everyone can do everything - at least not to such an extent that it would let them do something they would want to do. Practice can help, certainly, but it's not necessarily guaranteed to bridge the gap either. I mean, I personally find it baffling how many people seem to struggle with what I consider basic computer literacy, but that's a lot to do with the fact that I just happen to find much of it pretty simple and straightforward where a lot of people don't. Not everyone has a base aptitude to build on for every field or skill, and that's both fine and normal. And I mean - something as simple as the ability to put in the effort to practice and learn a particular skill or expertise is in itself a skill, and one that can be very selective about what contexts it's willing to apply to.
9 notes · View notes
redwyverndht · 6 months ago
Text
#include <iostream>
#include <swaglib>
int main()
{
int swag = getSwag();
if (swag < 0)
std::cout << "Dude wtf is wrong with you."
else if (swag > 10)
fuckingDies();
else
{
std::cout << "Me when I fucking GET you:\n";
case swag
{
10: 9: 8: 7:
std::cout << "I'm so so niceys :3";
break;
6: 5: 4:
std::cout << "Sniles so sneetly";
break;
3: 2: 1:
std::cout << "Duuude. Uncool :("
}
}
return 0;
}
4 notes · View notes
waterfaii · 1 year ago
Text
CodeBeauty
Switch/case part 2 leap year
#include <iostream> using namespace std; int main(){ //program to determine whether it's a leap year //below is the rule to determine whether the year is leap year or not: year % 4 = = 0 & & year % 100 ! = 0 | | year % = = 0
int year, month; cout << "year, month: " cin >> year >> month;
switch (month) {
case 2: (year%4==0&&year%100!=0||year%==0) ? cout << "21 days month." : cout<< "28 days month."; break;
case 4 : //30 days case 6 : //30 days case 9 : //30 days case 11 : cout << "30 days month."; break;
case 1 : //31 days case 3 : //31 days case 5 : //31 days case 7 : //31 days case 8 : //31 days case 10 : //31 days case 12 : cout << "31 days month.";break;
default : cout << "not valid"; }
}
18 notes · View notes
playstationvii · 8 months ago
Text
#Playstation7 #framework #BasicArchitecture #RawCode #RawScript #Opensource #DigitalConsole
To build a new gaming console’s digital framework from the ground up, you would need to integrate several programming languages and technologies to manage different aspects of the system. Below is an outline of the code and language choices required for various parts of the framework, focusing on languages like C++, Python, JavaScript, CSS, MySQL, and Perl for different functionalities.
1. System Architecture Design (Low-level)
• Language: C/C++, Assembly
• Purpose: To program the low-level system components such as CPU, GPU, and memory management.
• Example Code (C++) – Low-Level Hardware Interaction:
#include <iostream>
int main() {
// Initialize hardware (simplified example)
std::cout << "Initializing CPU...\n";
// Set up memory management
std::cout << "Allocating memory for GPU...\n";
// Example: Allocating memory for gaming graphics
int* graphicsMemory = new int[1024]; // Allocate 1KB for demo purposes
std::cout << "Memory allocated for GPU graphics rendering.\n";
// Simulate starting the game engine
std::cout << "Starting game engine...\n";
delete[] graphicsMemory; // Clean up
return 0;
}
2. Operating System Development
• Languages: C, C++, Python (for utilities)
• Purpose: Developing the kernel and OS for hardware abstraction and user-space processes.
• Kernel Code Example (C) – Implementing a simple syscall:
#include <stdio.h>
#include <unistd.h>
int main() {
// Example of invoking a custom system call
syscall(0); // System call 0 - usually reserved for read in UNIX-like systems
printf("System call executed\n");
return 0;
}
3. Software Development Kit (SDK)
• Languages: C++, Python (for tooling), Vulkan or DirectX (for graphics APIs)
• Purpose: Provide libraries and tools for developers to create games.
• Example SDK Code (Vulkan API with C++):
#include <vulkan/vulkan.h>
VkInstance instance;
void initVulkan() {
VkApplicationInfo appInfo = {};
appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
appInfo.pApplicationName = "GameApp";
appInfo.applicationVersion = VK_MAKE_VERSION(1, 0, 0);
appInfo.pEngineName = "GameEngine";
appInfo.engineVersion = VK_MAKE_VERSION(1, 0, 0);
appInfo.apiVersion = VK_API_VERSION_1_0;
VkInstanceCreateInfo createInfo = {};
createInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
createInfo.pApplicationInfo = &appInfo;
vkCreateInstance(&createInfo, nullptr, &instance);
std::cout << "Vulkan SDK Initialized\n";
}
4. User Interface (UI) Development
• Languages: JavaScript, HTML, CSS (for UI), Python (backend)
• Purpose: Front-end interface design for the user experience and dashboard.
• Example UI Code (HTML/CSS/JavaScript):
<!DOCTYPE html>
<html>
<head>
<title>Console Dashboard</title>
<style>
body { font-family: Arial, sans-serif; background-color: #282c34; color: white; }
.menu { display: flex; justify-content: center; margin-top: 50px; }
.menu button { padding: 15px 30px; margin: 10px; background-color: #61dafb; border: none; cursor: pointer; }
</style>
</head>
<body>
<div class="menu">
<button onclick="startGame()">Start Game</button>
<button onclick="openStore()">Store</button>
</div>
<script>
function startGame() {
alert("Starting Game...");
}
function openStore() {
alert("Opening Store...");
}
</script>
</body>
</html>
5. Digital Store Integration
• Languages: Python (backend), MySQL (database), JavaScript (frontend)
• Purpose: A backend system for purchasing and managing digital game licenses.
• Example Backend Code (Python with MySQL):
import mysql.connector
def connect_db():
db = mysql.connector.connect(
host="localhost",
user="admin",
password="password",
database="game_store"
)
return db
def fetch_games():
db = connect_db()
cursor = db.cursor()
cursor.execute("SELECT * FROM games")
games = cursor.fetchall()
for game in games:
print(f"Game ID: {game[0]}, Name: {game[1]}, Price: {game[2]}")
db.close()
fetch_games()
6. Security Framework Implementation
• Languages: C++, Python, Perl (for system scripts)
• Purpose: Ensure data integrity, authentication, and encryption.
• Example Code (Python – Encrypting User Data):
from cryptography.fernet import Fernet
# Generate a key for encryption
key = Fernet.generate_key()
cipher_suite = Fernet(key)
# Encrypt sensitive user information (e.g., account password)
password = b"SuperSecretPassword"
encrypted_password = cipher_suite.encrypt(password)
print(f"Encrypted Password: {encrypted_password}")
# Decrypting the password
decrypted_password = cipher_suite.decrypt(encrypted_password)
print(f"Decrypted Password: {decrypted_password}")
7. Testing and Quality Assurance
• Languages: Python (for automated tests), Jest (for JavaScript testing)
• Purpose: Unit testing, integration testing, and debugging.
• Example Unit Test (Python using unittest):
import unittest
def add(a, b):
return a + b
class TestGameFramework(unittest.TestCase):
def test_add(self):
self.assertEqual(add(10, 20), 30)
if __name__ == '__main__':
unittest.main()
8. Order of Implementation
• Phase 1: Focus on core system architecture (low-level C/C++) and OS development.
• Phase 2: Develop SDK and start building the basic framework for UI and input management.
• Phase 3: Work on backend systems like the digital store and integrate with front-end UI.
• Phase 4: Begin rigorous testing and debugging using automated test suites.
This comprehensive approach gives you a detailed idea of how each component can be built using a combination of these languages and technologies. Each section is modular, allowing teams to work on different aspects of the console simultaneously.
[Pixel Art/Sprites/Buildinodels/VictoriaSecretPixelArtKit #Playstation7 #DearDearestBrands]
Tumblr media Tumblr media
2 notes · View notes