AlanCcE
Hi guys, I'm sending this repo link to my Snake game Basically, it's a entire game, like these old Nokia ASCII snake game, totally in terminal, just doing it for fun :) If someone feels interested to take a look (or even contribute) would be nice, I have the entire dev roadmap in the documentation. Thanks to everyone 🤝
Olivia
What is heap ?? Can anyone explain in easy way pleasee
Анвар
What is heap ?? Can anyone explain in easy way pleasee
There is 2 heaps 1) Data structure 2) Memory location Which one do you mean?
Ибраги́м
https://www.youtube.com/watch?v=xVNYurap-lk
Hakeem
. Order marches with weighty and measured strides. Disorder is always in a hurry. mandatory To develop an algorithm that reads in three numbers and writes them all in sorted order you are going to create a flow chart and pseudo code. Create the algorithm in a flow chart save a screen shot and upload it to google drive, and give access to anyone with the link Create pseudo code in a google doc and and give access to anyone with the link
Hakeem
I need help here
/
is this a good way of reading an int32 from a char *
/
int32_t val = *(int32_t*)bytes + cur;
/
i dont thinl
AlanCcE
Hi guys, i'm reading the GNU C Manual and i have a question that the manual doesn't explain so much What are the differences between Structs and Unions in C? Which criteria should i have to choose one or another in my application?
AlanCcE
is this a good way of reading an int32 from a char *
You cold use the memcpy to do that in a more "semantical" way, using casting like that could be a little bit confusing (to me at least), using memcpy should be something like this: int32_t val; memcpy(&val, bytes, sizeof(int32_t)); val += cur;
Ziky
int32_t val = *(int32_t*)bytes + cur;
Only if you char pointer is always rounded to 4 bytes.
/
Yes thank yoi
Jillur Rahman
Z. Three Numbers time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard output Given two numbers K and S . Determine how many different values of X,Y and Z such that (0≤X,Y,Z≤K) and X+Y+Z=S . Input Only one line containing two numbers K and S (0≤K≤3000,0≤S≤3K) . Output Print the answer required above. Examples inputCopy 2 1 outputCopy 3 inputCopy 9 4 outputCopy 15 Note In the first test case all values of X,Y,Z that satisfy the conditions are : 0 0 1 0 1 0 1 0 0 In the second test case all values of X,Y,Z that satisfy the conditions are :
Jillur Rahman
is there any alternate way to do this instead of using nested loops like this(given below):
Chat Boss
Jillur Rahman Riyad sent a code, it has been re-uploaded as a file
Jillur Rahman
actually my code has exceeded the time limit
/
what is the code you wrote for
Jillur Rahman
ok
Ziky
where is K number used in your code ?
Jillur Rahman
https://pastebin.com/E53WsTfQ
Jillur Rahman
https://codeforces.com/group/MWSDmqGsZm/contest/219432/problem/Z
Jillur Rahman
Tran
I want to make a casual game, which game engine should I choose between Godot and cocos2dx for c++?
omar
Hello everyone👋 iam new in programming world i learnt c++ basics then i learnt OOP and i wanna make games with it and I'm really lost and i don't know which lib to learn ( i don't want to use game engine like unreal engine)
omar
https://www.libsdl.org/ but depends what do you want to make
and opengl is a library too ...? Like sdl ?
Ziky
https://en.m.wikipedia.org/wiki/OpenGL
Ziky
But IMHO it's a bit hell
Ziky
Could admin ban @Mah1898 ? Pms with suspicious file
/
https://en.m.wikipedia.org/wiki/OpenGL
help how does drm communicate with the gpu and the graphics ram
/
does it use special assembly instructions
Ziky
help how does drm communicate with the gpu and the graphics ram
I posted that lik juste because i can use google. If I knew something about DRM I would fix a bug in amdgpu drivers... but sory
Ziky
opensource driver of AMD graphics in linux kernel
/
opensource driver of AMD graphics in linux kernel
and what you need to know about it to fix the driver
ㅤ ㅤ
AMD GPU
Ziky
The basic priciple at least 😁
Ziky
But its offtopic here
/
The basic priciple at least 😁
you need to know like how the driver interact with it?
Chat Boss
Vitor sent a huge message, it has been re-uploaded as a file Hey guys! Im new to C and i dont know why im getting segmentation fault error in this code: #inc..
Ziky
What about stepping through it in debugger?
a Semicolon
Is there any group related to reverse engineering? Like hooking or injection?
IDCAN
Guys how to remove junk imports (from Import directory) in shared library? When I compile my lib on Windows, the compiled library always have some junk imports like "api-ms-win-crt-private-l1-1-0.dll", I guess to solve this question I need to use specific compiler version or linker or compile flags?
Anonymous
I can use clang without visual studio?
Ziky
why not?
Anonymous
I just few minutes ago download clang (for pretty compiler messages), but when i try compile appeared that error: PS C:\.dev\project\learn> clang .\main.cpp clang: warning: unable to find a Visual Studio installation; try running Clang from a developer command prompt [-Wmsvc-not-found] .\main.cpp:1:10: fatal error: 'iostream' file not found #include <iostream> ^~~~~~~~~~ 1 error generated. I download mingw64, but there doesn't exists bin folder. What I should do?
Anonymous
I just few minutes ago download clang (for pretty compiler messages), but when i try compile appeared that error: PS C:\.dev\project\learn> clang .\main.cpp clang: warning: unable to find a Visual Studio installation; try running Clang from a developer command prompt [-Wmsvc-not-found] .\main.cpp:1:10: fatal error: 'iostream' file not found #include <iostream> ^~~~~~~~~~ 1 error generated. I download mingw64, but there doesn't exists bin folder. What I should do?
You don't need a complete Visual Studio Installation but just a part of it viz Visual C++ Build Tools. Clang binary doesn't come prepackaged with the C++ Standard Library (libc++ for Windows). You must also point the clang compiler to the Visual Studio libraries which are installed as a part of Visual C++ Build Tools. This is done by setting some environmental variables and I kind of remember a bat file or something that needs to be run once to set this all up for you. You can search for it on Internet.
Anonymous
Guys how to remove junk imports (from Import directory) in shared library? When I compile my lib on Windows, the compiled library always have some junk imports like "api-ms-win-crt-private-l1-1-0.dll", I guess to solve this question I need to use specific compiler version or linker or compile flags?
How do you know that this dll is a junk import? What if some dll that your library depends on is directly or indirectly dependent on this dll? The compiler/linker usually optimize out stuff from the build that are not required without you specifying any special command line. But in some cases they are not able to do so. This is mostly related to transitive dependencies. In such cases, you have to manually go through the dependency list and remove the unwanted ones by testing your code completely after removing a dependency.
Anonymous
Vitor sent a huge message, it has been re-uploaded as a file Hey guys! Im new to C and i dont know why im getting segmentation fault error in this code: #inc..
@vitor_augusto1 Your binary search code is wrong. Especially this line: middle = l + (r-1)/2. This can cause middle to go out of bounds thus causing a segmentation fault.
Anonymous
I decided to install clang, gcc with msys and all works fine =D
In this case, clang uses the standard library version that comes with msys.
.
Hey guys, I'm looking for the perfect course on udemy to master c++ (from beginning). Some people say that you should also consider the version of c++ the teachers use while selecting the course, does it really matter? I think imma go with Abdul bari's course but it's C++11. What's your opinion??
.
that's no problem, recently C++ 11 is the minimum requirements to build something
One more thing, search c++ on udemy, Check the top 2 courses, one would be by tim buchalka and other from Abdul Bari, can you check the syllabus and tell which one of them is better? Pls, thanks.
💰💵⚛️💹⚛️💵💰
One more thing, search c++ on udemy, Check the top 2 courses, one would be by tim buchalka and other from Abdul Bari, can you check the syllabus and tell which one of them is better? Pls, thanks.
i'm seeing both authors, i think both curriculum are similiar, they r talking about c++ grammar & features, everywhere always similiar when someone wants to teach c++ programming, except, you are seeking a specific topics of c++, example, c++ with windows API like MFC / Win32, or c++ with QT, or C++ for interprocess communication, u need a C++ specific book
omar
is there any difference between cin >> var and getline (cin , var ) ?
Danya🔥
is there any difference between cin >> var and getline (cin , var ) ?
Yes, there is a difference between cin >> var and getline(cin, var). cin >> var reads input from the standard input stream (cin) into the variable var until it encounters a whitespace character (such as a space or a newline). This means that if the user inputs a string with spaces, only the first word will be stored in var, and the rest will be left in the input buffer. getline(cin, var), on the other hand, reads input from the standard input stream (cin) into the variable var until it encounters a newline character (\n). This means that getline will read an entire line of input, including any spaces, and store it in var. Here's an example to illustrate the difference: // User input: "Hello world" string var1, var2; cin >> var1; // var1 contains "Hello" getline(cin, var2); // var2 contains " world" As you can see, cin >> var1 only reads the first word ("Hello"), while getline(cin, var2) reads the rest of the line, including the space character, and stores it in var2.
Mahmoud
thank you
Danya🔥
Mahmoud
haha yea:p
Mahmoud
sometimes he makes errors lol
Chat Boss
ʙʀʜᴏᴏᴍ ℡ sent a code, it has been re-uploaded as a file
Лазиз
hi everyone! am i allowed to ask questions via screenshoots?
Anonymous
ʙʀʜᴏᴏᴍ ℡ sent a code, it has been re-uploaded as a file
Just change void add(Node *r, int value) to void add(Node *&r, int value) Btw your add function is not correct for the case where r is not null.
Anonymous
hi everyone! am i allowed to ask questions via screenshoots?
No. Attaching images is disabled in this group
Chat Boss
Anikalp Jaiswal sent a code, it has been re-uploaded as a file
...
Anikalp Jaiswal sent a code, it has been re-uploaded as a file
can anyone help me in this, like how to interchange x.first in this code to a char value
...
everytime I'm printing it, it shows its ascii value, and I have tried multiple ways but it's not happening