Serenity
for example
Serenity
I enter a string : "1121111..." , it doesn't go one line down , it just keeps filling the second string ..
Anonymous
i think you got the current design wrong
struct Quote {
virtual double net_price(quantity) const; // price of quantity items (needs access to price)
protected:
double price; // price of one item
}
struct Bulk_quote : Quote {
double net_price(quantity) const override; // price of quantity items (needs access to price from Quote and discount quantity and amount from Bulk_quote)
}
struct Limited_bulk_quote : Bulk_quote {
double net_price(quantity) const override; // price of quantity items (needs access to price from Quote, discount quantity and amount from Bulk_quote, max numbers discounted from Limited_bulk_quote)
}
you are saying to move the stuff related to discounted numbers to an abstract class. but the price of a single item still comes from the base class.
Anonymous
oh. thanks
Anonymous
Dima
Deep
MᏫᎻᎯᎷᎷᎬᎠ
Shahram
Hi, Rose, Thank you.
_ghost
I was recently playing around with compiler explorer by Matt Godbolt and I was wondering about the assembly code generated for C and C++ programs, so, Is there any good resources available for learning assembly language in context of understanding the code generated by the compiler for C and C++ programs?
A
Why I can't enter 2 inputs from user with unknown length of char pointer? It just ends the program after first input
A
char *str1;
char ch;
str1 = (char*)malloc(sizeof(char*));
printf("Enter a sentence:(Ex: Computer Engineer)");
str1 = (char*)malloc(sizeof(char*));
scanf(" %s", str1);
printf("Enter a character to search(Ex: g):");
scanf(" %c", &ch);
char *result;
result=mystrchr(str1,ch);
if(result!=NULL)
printf("%s",result);
else
printf("NULL");
Anonymous
Anonymous
neither pointers, nor arrays
Anonymous
i think you should read about all three from some book
noop
Artöm
noop
noop
Yes, but it is a good habit to avoid mistakes
Anonymous
Anonymous
printf("%zu\n", sizeof(char *)); to test
Anonymous
no. malloc returns a void * and takes in a size_t. he can store a string in there if he wants to, it won't be undefined behaviour. but the length of the string (including null) can be at most sizeof(char *)
Anonymous
Anonymous
yes. but he can store a string as long as it fits in the size of a char pointer
Anonymous
true
Anonymous
👨🎓
Nils
Hi, how can I convert a integer to a char array without including any headers?
Dima
Nils
Cast
No, I want to convert it to a human readable one
Nils
syntax error
Nils
aah you corrected
Nils
thank you
Dima
Lol
Nils
I didn't see it. oops
Amit
Hello ,i downloaded MinGW.exe file .....but i cannot fild .bin file here to choose path ....i download visual studio code
Amit
Find*
_ghost
Can you tell me in detail about list of numbers you generated i.e. 1110, 1100, 1010, 1000, 0110, 0100?
Nils
Hi, I am trying to write a function that iterates through a buffer until it has data:
https://del.dog/stanygrina.c
I am initialising kb_buffer like this:
static char kb_buffer[256] = {0};
And it gets stuck.
Any idea?
Anonymous
Anonymous
Can
Anonymous
Hello Admin,
I have a question, recently I have developed 2D platformer game using Unity3d game engine and I have published the game to web platform and I made the complete development open-source on my Github.
So can I share my development links in this group?
Please let me know
Can
I’m pretty sure you did not just read the rules under 60 seconds
Anonymous
Can
read the rules and do you
Nils
Nils
I have to provide these functions myself.
Anonymous
Nils
😅
Anonymous
Shvmtz
Hey
Shvmtz
Program to swap two numbers using pointer with structure
Shvmtz
klimi
Dima
Shvmtz
Sanjeev Chary HCL NAGARAM Hyderabad
✋ any one knows Web scraping
Message me 9398067734 personally to me Thanks Acharya
Dima
Bruh.
Anonymous
Hello! If you know other C/C++ groups, please send me the link in pm
klimi
klimi
Anonymous
why?
The more, the merrier!
klimi
ok, if that is so, check telegram group listing
Brax
Any professional who van handle this?
Brax
C*
Brax
Thanks buddy. What of you?
klimi
I am doing my HWs
Brax
Success..
Blue
Hello
Blue
Can anyone help me in making dll codes for application integration
Nils
Hi, I am having problems with the extern keyword:
I do "static int kb_block = 0;" in one file and "extern int kb_block;" in the other one. It results in:
"kernel.c:(.text+0x262): undefined reference to `kb_block'"
But the same works with regular functions.
Why?
Nils
Lol, solved right after sending this message: simpy remove the static keyword.
I promise I searched one hour to find that out