YK Y
anyone doing codechef long conest?
Mar!o
Don't underestimate me 😦
Mar!o
I will just write an OS abstraction... what could go wrong?
Mar!o
Probably I'll go with the minimalistic style: mutexes, semaphores and a basic atomic wrapper for the primitive types...
Mar!o
A friend of mine is really a thread expert - if I will fail he could help me. Without him I would not do it 😅
Mar!o
But I will learn something new by doing it 😉
Aditya
https://dev.to/adityaberi8/what-to-use-python-s-sum-or-numpy-s-np-sum-2ffj Do give you opinions on this in the comments to enhance the discussion
Mar!o
Hmm that's a problem I want to support mobile but I don't know the mobile systems well. BUT if I ho with a huge 3rd party lib - I don't want that I want a simple one header and one impl file with the minimalistic stuff...
MᏫᎻᎯᎷᎷᎬᎠ
So are we expecting the standard release this month?
Mar!o
But if pthreads might not work on mobile which library then? It sucks that threads are in C11 not C99. Also almost no C library is supporting the C11 threads. But now it's too late to switch to C++...
Mar!o
I know but I don't want to rewrite the whole system for mobile :/ also with kotlin I don't have the control I need... 😐
Mar!o
And I dind't choose C++ for this task because OOP it overkill for this and it is too bloated, C just works and compiles everywhere
Mjukuu
Hlw buddies any body coding on linux
Mar!o
Yes, thank you 😊
Mar!o
https://github.com/pierreguillot/thread
Mar!o
My wrapper would have been like this do you think it would have been so slow?!
Mar!o
And the NDK?!
MᏫᎻᎯᎷᎷᎬᎠ
Even while there are some virtual meetings?
Mar!o
Oh jesus I tought the NDK would allow direct access...
Dima
Lol
Mar!o
😭 I hate mobiles I will stay on PC
Mar!o
Or just ignore multithreading...
Anonymous
Hey ...need help.......write a program which can take a lists(stack of names) like consider cricket teams ,if I would specify certain names as input it should go through all the lists of the cricket teams(stack of names) and should produce an output which should match the names which I had given certain names as input.
Anonymous
Help please
Jasim
https://helperscript.com/udemy-paid-courses-video-free-to-download/
YK Y
int main() { cout<<main; }
YK Y
Why o/p 1
YK Y
It should give error!
YK Y
?
YK Y
Thank you got it
Athlantian
This is my assignment i want to code it by using simple c codes,so anybody can help me to do this please text me
klimi
This is my assignment i want to code it by using simple c codes,so anybody can help me to do this please text me
sure. you write gcc assigment.c it creates a.out executable, which is your program
Athlantian
klimi
I'm a beginner for it i can't manage it well
assigment.c is your c code, a.out will be your executable
noop
This is my assignment i want to code it by using simple c codes,so anybody can help me to do this please text me
First step, make a struct with details of the patients, something like this: struct Patient { const char *name; unsigned long phone; unsigned char age; const char *issue; const char *occupation; ... };
noop
First step, make a struct with details of the patients, something like this: struct Patient { const char *name; unsigned long phone; unsigned char age; const char *issue; const char *occupation; ... };
After this, make functions for writing to a file, reading from that file, getting new patient from the user, show all patients details, show one specific patient detail, modify one patient detail, erase one patient details, ...
noop
i try to do a repeat for another patient but it didn't work
You can put your code in pastebin.com and leave its link here, so we can look at it
Anonymous
#ask #beginner i want to know c language learning book for beginners?
Anonymous
Thanks bro
Dmitry
Thanks bro
c++ 21 days
Anonymous
## Rules #pinned * You are not entitled to an answer, getting angry about not answered questions will get you warned. * Not checking your problem in google (or any other search engine) first will get you a warn. * Asking for something that is in the pinned message right after joining WILL GET YOU BANNED. * C/C++ discussion preffered (assembly also allowed), asking about other languages (or groups for other languages) right after joining will get you BANNED. * Reverse enginnering, hacking and related topics are allowed, but asking to hack facebook, instagram, etc. is NOT allowed. Also if you ask "how to become a hacker" and obviously have zero knowledge on anything related to that you may get warned or banned. * Legitimate requests for help on code and programming questions are welcome. A request is considered legitimate if it describes your problem, what you've done so far and what went wrong. Requests such as "write my program" or "do my homework" are never considered legitimate. Asking not legitimate questions will result in a warn or ban. See https://stackoverflow.com/help/mcve on how to write good questions. * Asking for book recommendations is ok, but "pls give pdf book" is not allowed, find books by yourself. Posting illegally copied books (or links to those books) is also not allowed. * Only English language is allowed, if you speak shitty English or don't understand anything in English YOU WILL BE BANNED. * A little bit of programming related memes, jokes, shitposting are allowed. * NSFW content (porn, nudity, etc.) is not allowed. * Spamming/advertising (job posts are also ads, so ask an admin before posting) will grant you a warning or an immediate ban if you do it right after joining. * Religion, politics and ideological topics are forbidden. * Long code snippets must be posted via a snippet website(links below), posting pictures of code and posting long snippets in the group is not allowed. * If you encounter a problem, while using turbo C++, you will not be helped, use another more modern IDE. * Don't post compiled executables, that is obviously a security risk. * Personal messages without asking beforehand are not allowed. ## Resources About asking good questions: * [English](http://www.catb.org/esr/faqs/smart-questions.html) * [Translations](http://www.catb.org/esr/faqs/smart-questions.html#translations) For posting long code snippets: * [GitHub Gist](https://gist.github.com) * [Ubuntu Paste](https://paste.ubuntu.com/) * [Pastebin](https://pastebin.com) ## Reports If you notice any forbidden content, please use the /report command while responding to the offending post to report it to the admins.
I also want c++ game development books
Anonymous
Can we delete a element from between of a stack!? Like stack contain 1,2,3,4,5 I want to pop 3 but without using any another data structure?
kaushik shaab
program to print any char any one can write
Anonymous
Can we delete a element from between of a stack!? Like stack contain 1,2,3,4,5 I want to pop 3 but without using any another data structure?
ADT Stack is objects: a finite ordered list with zero or more elements, the element at the back of the list is designated the top element functions: for all stack ∈ Stack, item ∈ Element, maxStackSize ∈ positive integer Stack CreateS(maxStackSize) ::= create an empty stack whose maximum size is maxStackSize Boolean IsFull(stack, maxStackSize) ::= if (number of elements in stack == maxStackSize) return TRUE else return FALSE Stack Push(stack, item) ::= if (IsFull(stack)) return else create a Stack identical to stack except that it has an extra Element, item, which is the new top element Boolean IsEmpty(stack) ::= if (stack == CreateS(maxStackSize)) return TRUE else return FALSE Stack Pop(stack) ::= if (IsEmpty(stack)) return else create a Stack identical to stack except that the current top element has been removed from the stack Element Peek(stack) ::= if (IsEmpty(stack)) return else return the top element of stack
Anonymous
And am talking about stack using linked list.
Anonymous
And am talking about stack using linked list.
there are no functions in the interface of a stack to remove an element from the middle.
Anonymous
And am talking about stack using linked list.
if you have access to the underlying linked list, sure you can
Anonymous
but that doesn't mean you "delete a element from between of a stack"
Anonymous
What approach will you use to solve this:
Anonymous
The actual question is sorting a stack. You can use one extra stack only.
pop until unsorted and push to second stack, pop and keep unsorted in a variable and pop from second stack back to first stack until proper place for unsorted element is found. push unsorted to second stack. repeat the process until first stack is empty. pop items from second stack back to first stack
Anonymous
What approach will you use to solve this:
i would really not try to sort a stack, they are not meant to be sorted
Anonymous
i would really not try to sort a stack, they are not meant to be sorted
I found this Question quite stupid yet challenging, so thought to give a try 😅
Anonymous
😅😅
Anonymous
And what you meant by this?
the question itself should not be considered since stacks don't allow removing elements from middle by definition
Nils
Hi, why does getchar() return an integer instead of a char?
Nils
That seems pretty nonsense tbh
Nils
I am implementing my own getchar() that's why I ask.
Anonymous
pop 12 from stack1 and push to stack2. pop 2 from stack1 and push to stack2. 21 is unsorted, pop from stack1 and keep in separate variable. pop 2 from stack2 and push to stack1. pop 12 from stack2 and push to stack1. we have found a place for 21 in stack2 now, push 21 to stack2. pop 12 from stack1 and push to stack2. pop 2 from stack1 and push to stack2. stack1 is empty now. pop 2 from stack2 and push to stack1. pop 12 from stack2 and push to stack1. pop 21 from stack2 and push to stack1.
Anonymous
Nils
xD
Nils
I was confused by your answer
Anonymous
Sorry I didn't mentioned that you can use only one data structure only i.e. one another stack
Anonymous
Anyone from US or UK and has a verified blockchain account or can create should dm me
Anonymous
My bad 😅
Anonymous
You can use int
Nils
no
Anonymous
i don't think it is possible to sort anything without using a temporary variable