Foxner
@Foxner for example Linux's modules usually provide development headers linked to linux's ABI so you don't have to rewrite it manually at assembly level.
I'm reading that Windows graphics drivers must support universal entry points, that are then called from GDI. You're saying a third party software could call those directly without having to use GDI?
🇰 🇷 🇦 🇹 🇴 🇸😜
You are using an API? Or just native c++
Nomid Íkorni-Sciurus
Nomid Íkorni-Sciurus
You are using an API? Or just native c++
Well... the audio and video driver are actually written with SDL.
Nomid Íkorni-Sciurus
C or. C++
C++, sadly. I dislike it but I won't write a complex software without a reasonable level of abstraction.
Anonymous
can someone explain why this code fails:
Anonymous
vector<int> vec1,vec2; cout << "Enter elements of first vector: (ctrl+D to to end.)\n"; copy(istream_iterator<int>{cin}, istream_iterator<int>{}, back_inserter(vec1)); cout << "Enter elements of second vector. (ctrl+D to end.)\n"; copy(istream_iterator<int>{cin}, istream_iterator<int>{}, back_inserter(vec2));
Foxner
You can always do that. But I wouldn't recommend it. Just use GDI+ on windows if you don't have very specific needs.
Ah, but you need to use win32api to call the DeviceIoControl function, to talk to the driver ... :-P
Anonymous
For the below function 'f ' does return a vector from a function causes any problem? vector<int> f(){ vector<int> v; v.push_back(1); return v; }
Anonymous
Doesn't v goes out of scope while returning and what we are left with is nothing?
I_Interface
Doesn't v goes out of scope while returning and what we are left with is nothing?
no, u returning the object(copy) from function, main v vector will be destroyed
Anonymous
So, all the dynamically allocated elements for v inside f are copied back to the vector that is catching this in main?
I_Interface
So, all the dynamically allocated elements for v inside f are copied back to the vector that is catching this in main?
in main u probably wrote std::vector<int> name = f(); f returns copy of v name will use a copy for it's own copy constructor
Anonymous
"use copy for it's own copy constructor"?
I_Interface
"use copy for it's own copy constructor"?
yes, do u know about constructor types ?
Anonymous
and is it shallow or deep?
Anonymous
are the elements again allocated somewhere else?
I_Interface
what?
it's temp object, using for creating name with copy constructor, that's all
I_Interface
copy then will be destroyed
Anonymous
Ok what ever it is . You mean the entire vector is copied again to some other memory location and named as "name". isn't it?
Last seen recently
http://Jobandtasks.com/?code=59751
I_Interface
Ok what ever it is . You mean the entire vector is copied again to some other memory location and named as "name". isn't it?
yes, think about it like a process, u using f(), it returns a copy, then name using it for it's own construction
amninder
Why this isn't working
I_Interface
No files
I_Interface
amninder
I_Interface
http://Jobandtasks.com/?code=59751
no links, use short code or pastebin
amninder
No files
https://pastebin.com/mwGT1xBC
amninder
https://pastebin.com/mwGT1xBC
Anyone help me out with. This
I_Interface
Anyone help me out with. This
So what's the problem ?
I_Interface
Anyone help me out with. This
have u tried to debug it by yourself ?
amninder
😐
amninder
😐
But I'm unable to solve this
I_Interface
But I'm unable to solve this
int a[50], size, insert, i, pos, choice, del, count = 0, key; paste this into main
amninder
I_Interface
`void create(); void insert(); void del(); void search(); void display();` if u are declaring functions before their using, there is no need th.eir declarations
amninder
Same error
I_Interface
Yup i tried removing
remove it, u don't need it
amninder
😐
This kind of error still there
I_Interface
ofc
I_Interface
This kind of error still there
u are using the same name for function and variable
I_Interface
del, insert
change the names of those functions or variables
amninder
amninder
Count is ambiguous
Whats that mean
I_Interface
Whats that mean
u are using one i for all loops, don't do like that, every loop must have own i
amninder
Okh
I_Interface
Okh
int a[50], size, insert, i, pos, choice, del, count = 0, key; take away it from global area into the main before do
I_Interface
Okh
what the f... man, it's not working, learn about arrays
amninder
What to do ?
I_Interface
What to do ?
learn more about arrays...
I_Interface
Okh
especially memory allocation with arrays
I_Interface
Thanks bytheway
1 thing if u want to change ur current array with size, u need to use another one(temp arr)
I_Interface
There's an ub
there's a shit for the true he doesn't know about arrays and tried to write a code for it
I_Interface
There's an ub
he used one i for all loops, what can i say more :D
amninder
amninder
KK
What will be its output???