Ziky
BTW where did you get that useful formula?
Ziky
no
Olivia
ok
Ziky
I just don't get usefulness of that :D
Olivia
oki sir
Ziky
BTW ^ this is XOR
Olivia
aww i have no idea about it so i am still unable to understand so i am searching up in google for perfect example
Ziky
A ^ B you can look at it as it will those bits of A where bits of B are ones
Ziky
so decimal 3^2 is binary 11^10 = 01 binary which is 1 decimal
Vinsmoke
hi please can some one help me with the steps to follow to create the game tic tac toe, i am trying referencing to google and other books but i am not understanding
Anonymous
For all those messaging me and asking me why we don't allow images to be attached in this group
Anonymous
/
Hi I want to create a bare metal program which prints a string on the screen of a smartphone
Davide
Hi, i have made a program in c for the game connect 4 for 2 players to play against eachoder. I wanted tu implement the minimax algoritm to play also alone, but I don't know enough about c to get it right. I hope this is not agaist the rules... Thanks in advance 😁
/
hello ok :)
do you want to do it with me
hrb
hey , can someone explain this code for me int main(){ printf("hi"); return fork(); }
hrb
it’s really weird how it creates a child process but then that child prints hi. isn’t hi above that line? after seeing this i started questioning how return actually works
hrb
How do you know that it's the child which prints it?
both of them prints it . it prints hi twice . first one the father prints it then the other must be the child. i guess…
Ziky
do you want to do it with me
according your specification it looks you decide to discard any os from your phone and are about to initialize your cpu and then create driver for display and backlight control by yourself. My life is too short to do things like that even having phone schematic and datasheets of all necessary parts (which is very unlike)
Danya🔥
both of them prints it . it prints hi twice . first one the father prints it then the other must be the child. i guess…
So in C language, there's a cool thing called buffered output stream. Basically, instead of printing things right away, it collects them in a buffer and prints them all at once when the buffer is full. When you fork a process, the printing is delayed. So, the child process ends up with a copy of the same output buffer as the parent process. At the end of the process, both buffers with the same stuff are printed. If you want to check it out for yourself, you can use the "fflush(stdout);" statement to flush the buffer manually.
Ziky
BTW isn't it going to created infinity number of processes ?
Ziky
ah sorry there is no loop :D
NazTfgh
hi guys. can someone help me with creating an image list for my mfc app ribbon?
Olivia
What is mean by setjmp???
Olivia
What is it use for
Olivia
jmp_buf what does it do?
Anonymous
Between learning C and C++ which would be better? I just want to have a strong foundation in programming with one of these languages that is basically the base of all the others and start creating various projects, without a specific focus (like web and such, I just want to create a lot of programs to have a very solid base and move on to other languages.
Danya🔥
C++
It has more libraries, the community is larger, more various jobs
Anonymous
There is a pointers exercise that asks to compare addresses of two variables of type int For example int a{},b,{}; if( a& == &b){ cout<<“a”<<a&; }else{ cout<<“b”<<B&; } If a and b are the same size why does "a" end up having the largest address? I can't understand this can someone explain this to me clearly?
Anonymous
I don't know if I understood what you are asking but address is not the same as size
I know that, But how does he know that the address is greater than that of the variable “b”
𝕷𝖔𝖗𝖊𝖓𝖟𝖔
Hi, I am using UDP socket. I get this error: Address family not supported by protocol. My socket is delcared like that: client_socket= socket(AF_INET, SOCK_DGRAM, 0) And I don't get why this error occurs. Could you please explain me why? Thanks!
/
I have found this source code which contains the framebuffers addresses https://github.com/LumaTeam/Luma3DS/blob/master/arm9/source/screen.c
/
I have also found a book about reverse engineering the computers BIOS
Anonymous
Віктор
How i should to add x to begin of vector?
Віктор
push_back - add x to the end
Віктор
Insert
Vector.insert(x)?
Danya🔥
Vector.insert(x)?
Use the docs to figure this out, you've been given enough information
klimi
Vector.insert(x)?
You need to specify where to insert
klimi
Check cppreference
Anonymous
Hello I am a beginner in C++ but I know the basics of it. I want to build an application for working with images and also text data like excel(just to store data which will be used to merge with pictures). What are the requirements that I should learn. Thanks for any info
Danya🔥
Hello I am a beginner in C++ but I know the basics of it. I want to build an application for working with images and also text data like excel(just to store data which will be used to merge with pictures). What are the requirements that I should learn. Thanks for any info
To build an application for working with images and text data, you would need to learn the following concepts and libraries: Image Processing Libraries: You need to learn image processing concepts such as color models, image resizing, cropping, filtering, and so on. For that, you can use image processing libraries like OpenCV or CImg. Graphical User Interface Libraries: To create a user-friendly interface for your application, you need to learn how to use graphical user interface libraries such as Qt or GTK+. Text data storage: You can store your text data in CSV or Excel format. To work with these file formats, you can use libraries like CSVparser or Excel++. File I/O: You need to learn how to read and write data from files using C++'s standard library file I/O functions. Data Structures: You need to learn data structures such as arrays, vectors, and linked lists to store and manipulate image and text data. Object-Oriented Programming: You should learn object-oriented programming concepts such as classes, objects, inheritance, and polymorphism to write modular and extensible code. Debugging and Testing: To build a robust and error-free application, you need to learn how to debug and test your code using tools such as gdb, Valgrind, or Google Test. Version Control: To keep track of changes to your code and collaborate with others, you need to learn how to use version control systems such as Git. These are some of the essential requirements that you should learn to build an application for working with images and text data.
DaviChan
what is your favourite library for C++ (preferably modern C++ and cmake compatible) for formatting console output. I would like to have cross platform output text coloring and also format strings as well as ideally layout support for designing a TUI
Anonymous
what is your favourite library for C++ (preferably modern C++ and cmake compatible) for formatting console output. I would like to have cross platform output text coloring and also format strings as well as ideally layout support for designing a TUI
fmt library. Not the one in the standard library since C++20. I am talking about the standalone fmt library that supports C++17 and has all the features in the format library in C++20 and more. Layout design is something you can achieve with this one but you need to work a little bit. Coloring of text is well supported. Format strings as well. That is the whole point of this library and the one in C++20 https://fmt.dev
Anonymous
Well it is not a TUI library
It is not like ncurses or something. But it supports quite a bit of its features. Like I said, designing a TUI with it will be hard work but check out the link I gave in the earlier post. TUI support is being planned in version 11. Right now it is in version 9.4 and 10.* is in beta.
DaviChan
Well it is not a TUI library
all good i have a working gui library. I should be able to get the rendering in the console myself also :). Thanks a lot for the input, it doesnt need to be a drop in solution
Danya🔥
https://www.youtube.com/watch?v=eD-ceG-oByA So great!
ahmet
What is markdown formatting
klimi
What is markdown formatting
markdown is a markup language, so... markdown formatting is using the markup as markdown does for formating
ahmet
İ didnt understand
ahmet
İ wrote something befor in wrong formatting and i had warning i dont want to have one again
Danya🔥
Should I unban him?
klimi
Should I unban him?
dunno... previously there was 3 warns limit but dima changed it (again) back to 2
Anonymous
Should I unban him?
Yeah. He was just asking for a clarification because of the previous warning. I will unban him.
Danya🔥
Well, in my work codebase "deducing this" would be helpful Using std::print will be so much better for newbies
Mar!o
I also hoped for more C++ 20 had much more exiting features... But maybe in C++ 26 then. I hoped for compile time reflection :/
Anonymous
Hi everyone, anyone is aware of a nice resource to get started with STL in C++?
Anonymous
Hi everyone, anyone is aware of a nice resource to get started with STL in C++?
I used to do programming long back, but I stopped for some reasons now getting back to it just wanted my hands over STL
Anonymous
Hi everyone, anyone is aware of a nice resource to get started with STL in C++?
Read the Templates chapter in C++ Primer by Stanley Lippman to understand how STL works. Read the chapters on smart pointers, functors, Sequential and Associative containers to understand what the Standard Library provides to you using Templates. To understand Templates completely (till C++17) read C++ Templates (2nd edition) by Vandervoode and Josuttis.
Anonymous
Hello guys, is there any good alternatives to visual studio for C/C++ on Linux?
Anonymous
Yes, there are
I would like you to share them with me 😄
Ziky
I would like you to share them with me 😄
If you are ok with cmake then try clion its paid but for reasonable price or free for students. Or i like cevelop which is basically well tamed eclipse
Pavel
Hello guys, is there any good alternatives to visual studio for C/C++ on Linux?
I use QtCreator, it is pretty nice, there's also Clion, but it can be very demanding for resources on a not powerful pc