Naol
to none zero value
Priori
Priori
But the array elements are getting different value
Riya
It will give only the int part in x
Pooja
Okay.. Thanks
Mandelbröt
Sasuke
Yo
ברני
Hey, I'm reading a c book and I got a little confused with the get char and EOF, can someone maybe explain it to me better? 🙈 Exelmple.. main() { int c; while ((c = getchar()) != EOF) putchar(c); }
ברני
Oh and putchar..
Yash
hello friends....
Yash
there is one problem on HackerRank
Yash
https://www.hackerrank.com/challenges/compare-the-triplets/problem?isFullScreen=true
Dima
lol
Yash
Yash Patil, [30.10.20 18:35] int* compareTriplets(int a_count, int* a, int b_count, int* b, int* result_count) { result_count=(int *)malloc(2 * sizeof(int)); for(int i=0;i<2;i++) result_count[i]=0; for(int i=0;i<3;i++){ if(a[i]>b[i]) *(result_count)+=1; else if(a[i]<b[i]) *(result_count+1)+=1; } return result_count;
Yash
Yash Patil, [30.10.20 18:35] int* compareTriplets(int a_count, int* a, int b_count, int* b, int* result_count) { result_count=(int *)malloc(2 * sizeof(int)); for(int i=0;i<2;i++) result_count[i]=0; for(int i=0;i<3;i++){ if(a[i]>b[i]) *(result_count)+=1; else if(a[i]<b[i]) *(result_count+1)+=1; } return result_count;}
Yash
What data do you feed the function?
https://www.hackerrank.com/challenges/compare-the-triplets/problem?isFullScreen=true..here is a problem
Yash
👆here is a problem
Anonymous
hey help me i am making a game in c and vulkan and i get this segmntation foult err
Anonymous
cc vk_platformer.c vk/main.c -lglfw -lvulkan -I VK -o plat In file included from vk_platformer.c:22: vk/vk.h: In function ‘run’: vk/vk.h:3:3: warning: implicit declaration of function ‘create_instance’ [-Wimplicit-function-declaration] 3 | create_instance(); | ^~~~~~~~~~~~~~~ vk/vk.h:4:3: warning: implicit declaration of function ‘select_device’ [-Wimplicit-function-declaration] 4 | select_device(); | ^~~~~~~~~~~~~ vk/vk.h:5:3: warning: implicit declaration of function ‘vkClear’ [-Wimplicit-function-declaration] 5 | vkClear(); | ^~~~~~~ vk/main.c: In function ‘HasRequierdExts’: vk/main.c:53:65: warning: passing argument 4 of ‘vkEnumerateDeviceExtensionProperties’ from incompatible pointer type [-Wincompatible-pointer-types] 53 | vkEnumerateDeviceExtensionProperties(device,NULL,&ext_count,&available_extensions); | ^~~~~~~~~~~~~~~~~~~~~ | | | VkExtensionProperties (*)[(sizetype)(ext_count)] In file included from /usr/include/vulkan/vulkan.h:11, from vk/main.c:1: /usr/include/vulkan/vulkan_core.h:3288:49: note: expected ‘VkExtensionProperties *’ {aka ‘struct VkExtensionProperties *’} but argument is of type ‘VkExtensionProperties (*)[(sizetype)(ext_count)]’ 3288 | VkExtensionProperties* pProperties); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ vk/main.c: In function ‘select_device’: vk/main.c:83:55: warning: passing argument 3 of ‘vkEnumeratePhysicalDevices’ from incompatible pointer type [-Wincompatible-pointer-types] 83 | vkEnumeratePhysicalDevices(instance,&device_count,&GPUs); | ^~~~~ | | | struct VkPhysicalDevice_T * (*)[(sizetype)(device_count)] In file included from /usr/include/vulkan/vulkan.h:11, from vk/main.c:1: /usr/include/vulkan/vulkan_core.h:3228:49: note: expected ‘struct VkPhysicalDevice_T **’ but argument is of type ‘struct VkPhysicalDevice_T * (*)[(sizetype)(device_count)]’ 3228 | VkPhysicalDevice* pPhysicalDevices); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ ./plat By arydev make: *** [Makefile:18: run] Segmentation fault (core dumped)
Kenny
Use pastebin man
Anonymous
it was a github repo link
Anonymous
Kenny
sorry
Don't worry, it's better i think hehe
Shuntaro Chishiya
Hey guys can anyone help me how to hide PID ?
Shuntaro Chishiya
Of any particular data
Shuntaro Chishiya
Or app
Ammar
Process ID?
Ammar
I don't think you can, unless you rework the kernel.
Shuntaro Chishiya
Process ID?
Ya process id
Shuntaro Chishiya
Dima
It’s not possible unless you rework kernel
Ammar
I have to rework kernel ?
Yes, every process is managed in struct task_struct.
Ammar
https://github.com/torvalds/linux/blob/master/include/linux/sched.h#L813-L814
Anonymous
someone who can face any of these problems (1586,1658 in acm.timus) and share how solved it step by step? as a guide to understand how to apply the dp.
Foxner
Hi. The C++ international standard document that I've found on the internet states that all assignments "return an lvalue reffering to the left operand". I've read on cppreference that an lvalue is a type of a glvalue, which is "an expression whose evaluation determines the identity of an object ..." I'm confused. What does it mean for an expression to return an expression? To my current knowledge, assignments with default types as the operands return a reference to the variable that is being assigned to, but I'm new to the concept of lvalue. Can anyone shed some light on this?
Foxner
Also, is it correct to say that expressions like x = a and ++x return a reference to x?
Nils
You can actually do: x = y = a
professor
I have a stuck on dynamic workers . Example if I have 10 tasks = 4 workers , if its 100 = 10 workers so on , but how can I built of? tasks / ?? = ?
Anonymous
Anonymous
Hello
Hadaward 'Solly'
throw good practices through the window and you're good to go
Kenny
Hello
Hi, welcome
Kenny
Guys, how can i implement a search engine like Google with c++?
Hadaward 'Solly'
Pavel
Guys, how can i implement a search engine like Google with c++?
I suggest starting from here https://www.quora.com/How-do-you-build-a-search-engine-from-scratch-What%E2%80%99s-the-best-technology-stack-for-this
Douglas
/get cbook
Ammar
/report
Ammar
What kind of spam is this
James©®
Please ban her due to porn
Ammar
WTF
James©®
I am unable to delete this message anyone can help me
Gnostic Trades |
@MissRose_bot
James©®
/report
Hadaward 'Solly'
/report
Indolent
Admins y'all asleep or what
James©®
Admins y'all asleep or what
Please tell admins to take action
James©®
@OxFFFFFFFF please. Take action on this matter
Ибраги́м
Admins y'all asleep or what
Yes. We're humans
Ибраги́м
Not Boston Dynamics' Product
Ибраги́м
/ban into "/dev/null"
Indolent
Not Boston Dynamics' Product
You guys are Russians. Do Russians really need sleep?
Ибраги́м
You guys are Russians. Do Russians really need sleep?
You're correct. We're actually busy manipulation US elections
James©®
I have another request please delt these message from everyone
Ибраги́м
Sorry guys, bow cleaned up.
Ибраги́м
U can now throw Templates and Pointers at each other
Indolent
I will drink a vodka with my davushka
Indolent
Nacism?
that a Russian word
Ибраги́м
Thanks, now back to C++ inb4 your messages get purged.
Indolent
Fight for the motherland comrades!