Angga
I don't think that's correct...well at least from whats described ie you said each result element is the sum of all the elements after it including itself. Therefore when you get to 3 you should sum up 3 and 8. Since 8 is the last element it becomes the result. What you have just described is a different problem altogether.
Thank you for the advice, to be honest, this is my first time doing a programming task for a mentoring session. (I'm a fresh graduate from a vocational high school, LMAO no body care).  So I need to follow the task description or an example of the task (?)
Noob
Hii
jin
hii
Your senpai : )
can anybody help me related to git with vscode?
Mx
The examples are part of the task
In that case I would suggest you follow the task description and calculate new results for the examples.
Your senpai : )
What are your problems
Thanks, for asking but it's resolved
Nicholas
I don't understand at all. Windows documentation about Winsock: https://learn.microsoft.com/en-us/windows/win32/winsock/sockaddr-2 Here they show 2 already existing structures: struct sockaddr { ushort sa_family; char sa_data[14]; }; struct sockaddr_in { short sin_family; u_short sin_port; struct in_addr sin_addr; char sin_zero[8]; };
Nicholas
But in this piece of code they "create"(?) another structure with the same name by using the struct keyword: struct sockaddr_in saServer;
Nicholas
Why they don't just: sockaddr_in saServer ?
Hi all.Where can I download GCC C Compiler for C latest version?
Simple Sorcerer
Hi guys Why in Linux in the compiler mingw32-w64 - libc library is missing
harmony5 🇺🇳 ⌤
But in this piece of code they "create"(?) another structure with the same name by using the struct keyword: struct sockaddr_in saServer;
They're not creating another struct, they're declaring a variable with that struct type. You use the struct keyword when declaring/initializing variables of struct type
dontu
For Windows
https://www.mingw-w64.org/ Don't forget to add path to bin folder
lean
i'm not able to use OpenCL on windows, may anyone help ?
lean
i'm not able to use OpenCL on windows, may anyone help ?
intel gpu, can't find how to install opencl headers / sdk
Ибраги́м
Initialization in C++: A Corner Case · GitHub https://gist.github.com/ckwastra/77b0e67ed157fc1038b167c0a9b546db
Thomas
Anyone wanna code a new kernel with me?
\Device\NUL
Anyone wanna code a new kernel with me?
How far you've write it?
Thomas
How far you've write it?
I’ve just started it and want to turn it into a project
dontu
Where is the download link?
https://github.com/skeeto/w64devkit/releases/tag/v1.23.0
𝙂𝙊𝙅𝙊 💸💎
My name is shreyansh
Tawfiq Ahmed
Hey everyone!! I have a question, I'm planning to get into the field of Kernel Programming and Embedded Security, which programming language should be my first consideration? Should it be C or C++? I'm a little confused?
Tawfiq Ahmed
#res
Rose
#res
Please check out this channel - @Resources for information on learning sources for C and C++ (books and videos) and Frequently Asked Questions.
Rose
Reported 𝙂𝙊𝙅𝙊 💸💎 [6706380103] to admins.​​​​​​​​​​​
EmbRio
Hi
EmbRio
anyone can help me please
EmbRio
this is about my code of c program
EmbRio
the code like this
EmbRio
// Declare a variable int myNum; // Assign a value to the variable myNum = 15;
harmony5 🇺🇳 ⌤
And what's the problem?
EmbRio
okey the problem is when i want to run this code it could'nt working
EmbRio
i am trying run this code but it never happend
EmbRio
// Declare a variable int myNum; // Assign a value to the variable myNum = 15;
EmbRio
what should i do now
EmbRio
And what's the problem?
the problem that i wrote above
EmbRio
And what's the problem?
would you please help me
Thomas
share it
https://github.com/RiskyGUY22/Risky-OS/tree/main Rn it’s not rly got much functionality at all since I just started, but my aim it make a fairly simplistic kernel which can do everything a basic system should be able to do
Ludovic 'Archivist'
https://github.com/RiskyGUY22/Risky-OS/tree/main Rn it’s not rly got much functionality at all since I just started, but my aim it make a fairly simplistic kernel which can do everything a basic system should be able to do
Just add memory allocation and you can start executing programs/run an interpreter. Add keyboard input to that and you have a working kernel level command line
Ludovic 'Archivist'
It requires implementations of malloc, realloc, and free. It does not care if realloc moves the data
Ludovic 'Archivist'
Oh and putchar
Danya🔥
I have a tiny little funky interpreter with very little requirements that you can use at https://git.nekoit.xyz/Archivist/ink
Do you have any spec? Maybe when I'm more free, I'm gonna implement it using modern technologies
Ludovic 'Archivist'
Do you have any spec? Maybe when I'm more free, I'm gonna implement it using modern technologies
I could make one. I implemented it in C# too at some point, took 150 LoC in that.
Ludovic 'Archivist'
The C version compiles to less than 20KB and I'd like it to stay like that
Danya🔥
I could make one. I implemented it in C# too at some point, took 150 LoC in that.
I'm craving on implementing something with MLIR, LLVM and C++
Danya🔥
But currently I have a lot on my plate
Ludovic 'Archivist'
But currently I have a lot on my plate
Same. I actually implemented ink because I foresaw using it on one of my jobs
Thomas
Just add memory allocation and you can start executing programs/run an interpreter. Add keyboard input to that and you have a working kernel level command line
Yeah I plan to do that, problem is I don’t really know how I can make a basic memory allocation, since the one Linux uses is very complex and rn I want a very basic one enough to do simple things
Thomas
And can I not just use malloc instead of making a function?
purple rose
thanks
Omar
Anyone here doing cpp for unreal engine?
Elena
Yeah I plan to do that, problem is I don’t really know how I can make a basic memory allocation, since the one Linux uses is very complex and rn I want a very basic one enough to do simple things
I don't know why it is complicated. The memory allocation algorithm by Linux is considered to be a standard now. Anyway for the case in consideration here, it is just an interpreter that just does basic things like operations on integers. So you could just use a very simple algorithm like allocating a huge chunk of memory and dividing it into small blocks of integer sizes.
Elena
Or maybe Rust
I have nothing against Rust but for someone who has programmed in C and C++ for a long time, and who loves them, the idea of programming in Rust might be off putting. The borrow checker is just a pain in the ass which prevents most idioms in C++ even when you know what you are doing.
Elena
They say C++ programmers create so many bugs unknowingly and Rust compiler prevents them but no thanks. The bugs I create in C++ can be debugged no matter how tough it is to do that but I would rather do that than program in Rust
Brooklyn
hello im new here
Sorry bro no hello kindly read rules
Brooklyn
#meta
Rose
#meta
Don't ask meta questions. In other words, don't ask to ask. Questions like "Does anyone know XYZ?", "Has anyone used XYZ?" or "Can someone help me?" are all considered meta questions because they don't specify what your actual problem is. These questions give the impression that you want people to approach you and offer their help as if they don't have any other work to do. Now doesn't that expectation make you look like an idiot? If you have a question ask it directly. You are more likely to get a response that way.
Brooklyn
ok
Glad you understand if you want to ask any question no matter if it’s programming related or not than kindly join our c/c++ OT group you can discuss anything there and also freely say anything
Roman
Hello Community. Currently I am developing an application using Raylib. The tough time - is with how to properly do Config and has it available across application (probably Singleton approach?). I want to do it best way possible, so I won’t have that much drawbacks or difficulties using. What is good approach for this? I have multiple scenes that are using different set of data from configuration file and based of that I have data filtering and display (currently no store state). Would be grateful for an advice.
Nik
Ladies and gentlemen
Nik
Is there anyone who can reverse crack it?
Nik
For example, cheating in games