Notaxmar
Yes, stdlib is on Standard
Okay thank you very much
klimi
Can some one please loook into it
is that some assigment?
Billionaire
%Nikita
You need 2 cycles.
Cycles is a waste of your CPU clocks in this case. Just output strings that stored in .data section
Anonymous
Can some one please loook into it
You are comparing se to variables male and female but you have not defined a value for those variables. Also change your scanf statement to scanf("%d\n%c",&sal,&se)
Nada
Hey friends
Nada
I'm working on undo redo operations And I decided to make it by this way Save each operation and store it in a vector of strings then if user choose to make undo Hel will load the graph on it
Nada
I tried this by save and load and it works
Nada
But I can't know how to implement it
Nada
As the first step I have to know how to save each operations
Nada
So do you have any suggestions,l?
B;
https://pastebin.com/T83riF9Y
B;
the program works fine and runs as it should but i want it to quit when I enter "quit" as an input, however it only takes integer values as input, if I put anything else it returns an error.
B;
I want it to take both, int as well as char values, can anybody help
Anonymous
How to untie cin from cout? I want to make a class which will untie cin in constructor and tie in destructor
𝕰𝖉𝖚𝖆𝖗𝖉𝖔
How can I stop a program when a char has been input, i have a getchar() can't figure out
Dorith
How can I write a module of number |4-5| in c++?
Konstantin
how?
Digits should count down then count up every string. It makes already 2 cycles per string. But the lowest value of the every string counts down and counts up too. So there should be 2 cycles. One per half of output.
Anonymous
I want it to take both, int as well as char values, can anybody help
You would then have to change your program to read a string as input instead of an int. If the string input is "quit", you exit the program just like you do now when input is 0. If the input is anything else, you first convert it to an int (if the input is neither quit nor an integer, you inform the user and prompt him/her for a valid input again) and then do the rest the way you are currently doing.
Anonymous
How to find a frequency of character in string in c??
Droningbro
How to find a frequency of character in string in c??
Make an array of 26 letter and and then increment the letter frequency accordingly
Mr
Can some one please loook into it
You have to use char s[n] Instead of string s, cause cpp complier doesn't know the length of the variable you are passing in, That's why it doesn't set value of s[0], s[1], s[2] etc
Chat Boss
How to find a frequency of character in string in c??
0101 sent a code, it has been re-uploaded as a file
Kartik
I want to implement a memory pool in C++, can anyone tell me different ways to do this?
Kartik
Examples would be very helpful, thanks
Kartik
I am not making any software (just learning about memory pools)
Kartik
I am not making any software (just learning about memory pools)
I searched on google but was not able to understand it from there, sometimes the syntax was not understandable, other times the logic was not understandable. Please help me regarding this problem. Thankyou.
Otoniel
First, thank you, this is the first time I hear about memory pool, so I've end up learn it too, first I did some research to understand the concept, and Wikipedia has a clear explanation + implementation instructions, even after that read, wasn't that clear at all, but, then, I found the jobtalle's pool repo on GitHub, it is a memory pool implementation, includes a test you can use to understand how to use the pool yourself, hopefully it will be useful to you Kartik
Anonymous
I want to implement a memory pool in C++, can anyone tell me different ways to do this?
This is a good starting point to understand why we need different memory allocators https://github.com/mtrebi/memory-allocators The code however is a straightforward C++ implementation of the concepts. But be aware that the C++ standard now supports std::allocator, std::allocator_traits and so on which make it somewhat easier to write allocators (but are clunky nevertheless). The C++17 standard made memory allocations slightly more easier with PMR (std::pmr::polymorphic_allocator). This was a welcome change to the one supported in C++11/14. You can refer to the following talks to understand better: https://m.youtube.com/watch?v=LIb3L4vKZ7U (Andrei Alexandrescu) https://m.youtube.com/watch?v=RLezJuqNcEQ (Alistair Meredith) https://m.youtube.com/watch?v=v3dz-AKOVL8 (Pablo Halpbern)
Kartik
Will see this repo and what @gaegelys said
Ибраги́м
Monitor your services with: https://github.com/louislam/uptime-kuma
Katrin
Does anyone know how to create a recursive function that counts prime numbers in array (C language)?
Yegor
what's the problem of this code: do { ch = fgetc(file); printf("%c", ch); } while (ch != "\0"); file just contain "Hallo, world\n" ?
Yegor
ch != '\0'
why ? \0 - mean end of the string.
Ighor
why ? \0 - mean end of the string.
I meant to use ' instead of " for char/int type
Kartik
why ? \0 - mean end of the string.
Yes but can't use with integer array
Anonymous
Does anyone do project in C?
Anonymous
Management hospital in c
klimi
Management hospital in c
A lot of people do this project for some unknown reason
klimi
College/school projects lmao
I doubt that, its forbidden in this group to ask for assignments :)
Mr
Management hospital in c
Is it like encrypted database where all patients details store there? If not then it's quite easy to do for college projects.
Chat Boss
Anikalp Jaiswal sent a code, it has been re-uploaded as a file
Mr
It should work with files
Then it's quite easy in cpp, don't know about c
Anonymous
Which c++ ide is more comfortable for beginners?
klimi
Which c++ ide is more comfortable for beginners?
depends what you want to do, but something like codeblocks or visual studio is fine (back then when i was starting)
Anonymous
Can someone explain me, what is COM-Server?
Anonymous
And generally COM
Anonymous
And for what does Windows use it
%Nikita
ch != '\0'
But you should read until EOF character. stdio.h #define EOF -1
Anonymous
And generally COM
Center of mass
Anonymous
Maybe 😏
Anonymous
?
Anonymous
?
Dont know bro sorry
%Nikita
And generally COM
As I remember, COM is an old DOS executable file extension. It can be executed in 16 bit mode, idk about 32 and 64 machines. The simpliest .com file ( DOS program ) will look like this: BITS 16 ORG 100h start: mov ah, 4ch int 21h It's just return
Anonymous
I meant
Anonymous
Component Object Module
%Nikita
Component Object Module
I think I am not familiar with that =)
Anonymous
👍
/
hi i need help to compile a twrp
0101
Not showing
i dont know why its automatically sent as a file, heres my code.. int main(){     char str[100];     int count[256] = {0};     printf("Enter a string : ");     fgets(str, sizeof(str), stdin);     for(int i=0 ;i<strlen(str); i++)         count[str[i]]++;     for(int i=0 ;i<256; i++)     if (count[i] >0)          printf("'%c' appears %d times.\n", i, count[i]); }
Chijioke
Can someone explain how Rand()% MAX Help to generate random numbers in c.
klimi
Can someone explain how Rand()% MAX Help to generate random numbers in c.
rand() dives you random number, if you take modulo of the number you will havve random number from 0 to MAX
Chijioke
I know % is to return the remainder. So how does %MAX now give 0 to MAX
klimi
if you have like number 123 and you divide it by 5, the remainder is 3
Chijioke
Like in my mind, it like rand() is ≈37000 and MAX=100 then rand()%MAX will now be 0