Ludovic 'Archivist'
And sometimes even worse, you will have data that may actually already be sorted
Ludovic 'Archivist'
So like said someone with wisdom
Ludovic 'Archivist'
Dima
Lol that pack
Ludovic 'Archivist'
Lol that pack
One of my favorites
Ludovic 'Archivist'
I may even have 2 packs of them actually
MᏫᎻᎯᎷᎷᎬᎠ
itsmanjeet
why not
/usr/bin/ld: obj/io.o: in function `__static_initialization_and_destruction_0(int, int)': io.cc:(.text+0x702): undefined reference to `__dso_handle' /usr/bin/ld: obj/sys.o: in function `__static_initialization_and_destruction_0(int, int)': sys.cc:(.text+0x145): undefined reference to `__dso_handle' /usr/bin/ld: sys.cc:(.text+0x177): undefined reference to `__dso_handle' /usr/bin/ld: ker: hidden symbol `__dso_handle' isn't defined /usr/bin/ld: final link failed: bad value
Dima
show the whole code
itsmanjeet
wait
itsmanjeet
## Code For Sys.cc ## #include "api/sys.h" Sys sys; Sys::Sys() { } Sys::~Sys() { } static inline void Sys::out(uint16_t port, uint8_t val) { asm volatile("outb %0, %1"::"a"(val),"Nd"(port)); } static inline uint8_t Sys::in(uint16_t port) { uint8_t ret; asm volatile ("inb %1, %0" : "=a"(ret) : "Nd"(port)); return ret; } void Sys::abort(void) { io.out("kernel : panic\n"); } ##### Codes of sys.h ################### #ifndef SYS_H #define SYS_H #include "types.h" class Sys { public: Sys(); ~Sys(); static inline void out(uint16_t port, uint8_t val); static inline uint8_t in(uint16_t port); void abort(void); }; extern Sys sys;
itsmanjeet
so that i can use sys object without initilizing again and again
Dima
Use pastebin.com for a large code snippets please
Dima
Oh it’s not that big, nvm
Dima
you want one global variable/singleton?
itsmanjeet
🤷‍♂️ i just not want to initilize object
itsmanjeet
directly use
Dima
Yeah you just want to implement a singleton. but your linker error points to some other file
itsmanjeet
yup
itsmanjeet
https://github.com/itsManjeet/ReleaxCpp « Link for complete project
itsmanjeet
^ it the link for complete codes
Anonymous
Any help?
Roberto
guy I need your help
Roberto
https://pastebin.com/HnehYSjp
Roberto
when I try to compile this code, some errors appear. The first is: " error: ‘double’ is not a template Data Result(double<vector> set);"
Roberto
but I dont even know what is a template!
Roberto
lol
Roberto
no ok I found 1 mistake, a noob's mistake: I wrote vector>double> instead double<vector>
Roberto
I meant the viceversa
Light
Yes in line 15
Roberto
And sum{0} was no declared
Light
but I dont even know what is a template!
Template is used so that a function or class can work on several datatypes. We will not have to rewrite a function or class for different data types
Roberto
I did a lot of stuopid error. Dont pay attention to the message above xD
Mihail
And sum{0} was no declared
well it wasn't declared lol
Mihail
maybe you meant: auto sum {0}; ?
Mihail
yeah, if you want it to be a double
Mihail
but you must add a type
Roberto
yup
Anonymous
Hello
Anonymous
I wanr to leaen c & c++ in easy way and in short time is there any short way plz give me some answer..........
Anonymous
no there's not
What i have to then
olli
What i have to then
If you want to learn you need to practice
Anonymous
If you want to learn you need to practice
But i dont know any things about c & c++
Anonymous
Plzz
Anonymous
Teach me
olli
Teach me
how much do you pay? We are not here to teafch There are enough resources ot there in the internet. If you are not willing to invest the time to search them I doubt you have the will to actually learn programming
olli
I cant pay plzz give me some resources....???
Tutorial http://www.cplusplus.com/doc/tutorial/ Latest Standard (Draft) http://open-std.org/JTC1/SC22/WG21/docs/papers/2017/n4659.pdf Reference https://en.cppreference.com/w/
Prometheus
Has anyone gotten the error: "attempt to use a deleted function" when using multithreading?
Francisco
Prometheus
Ok. Cant figure out why I'm getting it. Nothing I do gets it to go away.
Prometheus
It has nothing to do with multithreading.
What's it from? I've only ever gotten this error now when using threads.
Francisco
Ok. Cant figure out why I'm getting it. Nothing I do gets it to go away.
If you don't show us any code, we can't help
olli
What's it from? I've only ever gotten this error now when using threads.
The error says it: you try to use a deleted function. You might try to copy an object that's not copyable. But without seeing the code, how can we tell?
Prometheus
https://pastebin.com/ynQEFzVS
Prometheus
I probably made a stupid mistake being half asleep but no better time to try something new then when doing an overnight at work lol
Francisco
And the compiler full message?
olli
I probably made a stupid mistake being half asleep but no better time to try something new then when doing an overnight at work lol
static assertion failed: std::thread arguments must be invocable after conversion to rvalues
olli
This has nothing to do with deleted functions
olli
https://pastebin.com/ynQEFzVS
you need to pass the bool parameter to std::thread as well e.g. std::thread worker(work, false);
Prometheus
you need to pass the bool parameter to std::thread as well e.g. std::thread worker(work, false);
Wouldn't I want to pass it as true? false would cause it to stop running. Meant to test it with the bool as global just to see if it worked lol.
olli
Wouldn't I want to pass it as true? false would cause it to stop running. Meant to test it with the bool as global just to see if it worked lol.
true would result in an endless loop. So it doesn't really matter you don't get the desired result. but yeah, it was just an example hence the e.g Btw. you have no "global"
Prometheus
it's better not t use a global
That’s why I didn’t out of habit. I just figured I’d test it with global and then go from there because it would make it slightly quicker and easier to write.
Prometheus
Ok, thanks for the help.
D
Hi, when is the data and IC exactly sent to IMC?
D
linux kernel code !!
D
or is it related to hardware !!