labyrinth
I used an vector of object, and there is a function that return a reference by vector::back, can this reference be possibly invalidated in the future ?
labyrinth
Danya🔥
Anonymous
1. Stack using arrays
2. Stack using list
Which is better and why?
klimi
Sketchyyy
Valeriy
node->data = data; // Assign data to this node
cout<<"General tree created is as follows:"<<endl;
this is madness correct? why some people using > instead of one symbol?
ssun
Anonymous
the more read
Hades
Also code in C++
Anonymous
yep
Hades
Just reading and reading C++ won't do.
n
OK
Ольга
Good evening. Sorry to distract you. Just faced with the question of whether it is possible to number the matrix from the end. For example, 1 2 3 have a location 1 - [0], 2-[1],3-[2], and I would like it to be the opposite, the numbering would start from the end then 3-[0], tell me please if it is possible. And if so, how I can do that. Thanks for the reply in advance
Ольга
Ибраги́м
Keytap3: acoustic keyboard eavesdropping | C++ and stuff
https://keytap3.ggerganov.com/
Laopigo
Ольга
\Device\NUL
In unistd.h, there's bunch of macro __NR_xxx . What NR stands for ? I've googled it but i didn't find answer
Anonymous
\Device\NUL
Anonymous
Yep
They are system call numbers. Each system call has a defined number. When a system call is made, it is not like a regular function call. What happens underneath is that some information is set up to identify the system call and it's parameters. Then a kernel mode switch happens. The kernel uses the setup information to identify which system call was made. The #defines you see in that file are the numbers which identify a particular system call.
For ex __NR_dup identifies the dup system call.
Anonymous
Yep
Just realized that you asked what NR stands for.
According to this answer :
https://stackoverflow.com/questions/8306202/what-does-nr-stand-for-in-system-call-number-that-is-usually-used-as-suffix
it stands for either "NumbeR" or "Numeric Reference"
Anonymous
http://ithare.com/wp-content/uploads/part101_infographics_v08.png
Bereket
How do we store a value in vector from a file ?
.
Hey how can i implement static library with multiple header file
.
or how can i find project source with implemented static library
\Device\NUL
Anonymous
Hey how can i implement static library with multiple header file
Your question is an oxymoron. A static library is an archive of compiled files i.e. object files used for linking your code. Header files are not needed at the linking phase. If you have a header only library, users just need to include those files in their source code for the compilation phase. So you only need to be able to ensure that those header files are available at a location which is in the search path for include files. You can't create a static library from only header files.
.
.
Anonymous
I am using Visual Studio 2022 and its project template for creating Static Library i will express myself more cleary
My answer doesn't change depending on whether you are using Windows or *nix ststems. A static library is a collection of compiled object files. Static libraries don't and can't include header files. If you want you can package your header files along with your static library in a zip file and expect the user to put the header files where their compiler can find them.
Static libraries have nothing but compiled object files inside them waiting to get linked.
.
labyrinth
when vector increase capacity, does iit use move construct or copy construct
trynafindanu
Can someone give me some suggestions please?
Idk anything about c programming
I'm completely beginner
What should I do?
You will be in great favor if you help me
Please 🙏
\Device\NUL
.
Anonymous
I think he/she want to create static library with multiple headers
What is stopping him/her? His question didn't make that clear. You can have multiple header files and source files in a library and construct a static library out of it. The static library will have just the object files but. So he will have to find a way to provide the header files separately.
Some people just can't ask a question to the point and if people try to help them they get angry and say that the person is rude for not understanding their question.
n
hello,How to start learning C language? Do you have any textbook or online class recommendations
Anonymous
Anonymous
void* thread_run(void* arg)
{
printf("%s, %lx, pid : %d\n", (char*)arg, pthread_self(), getpid());
sleep(5);
return (void*)10;
}
int main()
{
pthread_t tid;
tid = pthread_create(&tid, NULL, thread_run, "thread 1");
printf("main : %lx, pid : %d\n", pthread_self(), getpid());
sleep(2);
void* ret = NULL;
pthread_join(tid, &ret);
printf("thread quit code : %d\n", (long long)ret);
return 0;
}
Anonymous
why dose this code run with a segfault
Anonymous
maybe the printf is wrong, but the param ret is needed by pthread_join
Anonymous
void** retval
Anonymous
and then i try to use the "int ret" to the "(void**)&ret", but still segfault
\Device\NUL
Michel
Hi! I need help with move constructor: https://pastebin.com/Zq14a0Uu
As a summary: I want to be able to return form a function an object that allocates memory on the heap, so I want to move-return it, but then the object left on the function scope tries to delete something that is not there anymore (or at least that's what I have "understood" so far)
Anonymous
Michel
\Device\NUL
Anonymous
what???
Anonymous
but why i gain a fault
\Device\NUL
Test using GCC and Clang seems ok
Anonymous
i just use gcc
Markelle
Hello guys, I'm new here and I have a question how can I implement quick sort using iteration in a doubly linked list. I'm using C language.
Here's my progress so far
https://pastebin.com/j6dE3JsD
I'm currently having a problem on the QuickSort() function.
Michel
Stefano
can you recommend a ide for windows 10 32 bit?
Michel
Michel
Anonymous
Robert
Is there anyone here doing computer vision using c++
Adam
thats some set of rules!
Anonymous
the function pow
Adam
I have a program which handles binary commands to BT-LE devices, and that data is best represented as arrays of uint8_t ... but I have to also work with QByteArray, which only works wth signed char .... im hiding the details behind a macro which does a reinterpret_cast, and im wondering if there is a better way??
Emanuele
hey i'm a beginner with c++ code, i would like to ask you an advice: I would like to buy a book for learn how code in c++, do u know any good book to get started? (not too complicated or hard to read, something to help me get started)
thank you in advance, and sorry for my english, i'm from italy
Anonymous
c++ primer
Danya🔥
Danya🔥
Anonymous
Danya🔥
Anonymous
C + + books will more or less cover the bottom
Danya🔥
There's no good C++ course for beginners on YouTube
Anonymous
MIT?