ABitOn
Wisenky
hi guys
Wisenky
hi guys I have a question ,cant I assign strings in C like scanf("%s",&university->(faculty+i)->facultyName);
Wisenky
it brings error [Error] expected identifier before '(' token
Anonymous
Try scanf("%s",&(((university->faculty)+i)->facultyName));. Assuming that faculty is an array in university structure
Wisenky
okay I will thanks sir
Dima
Anonymous
Hello
Anonymous
Guys am new in this group
...
Hello. I'm new here. I'm a diploma student and I hope you can help me with C programing. 😁
Anand
Hello guys
Asad
Anonymous
Sorry
Serenity
How can I free a dynamically allocated struct pointer ?
Rutuja
thanku 🥰
hdklg_23
Anonymous
Karthik
Shall I learn game programming here unreal engine game
.
4 as input
professor
how can I create information leaks in form of memory disclosures??
.
Can someone pls explain this problem i am stuck
Anonymous
Hii
Anonymous
I am new I don't know anything about c++ so I am beginner
Anonymous
I want to learn
Sandy #КИБЕРИНЖЕКТОРЫ
so learn
K
Members of unordered maps are constants?
Anonymous
/warn screen photo
Anonymous
.
Sorry i am new to this group
Anonymous
Is there any way to convert keys into mutable ?
No way
You can't modify keys because if the internal structure of the map is dependent on keys and when you modify any key, the map can't track this change so the map can't reorder internal structure of itself
Anonymous
You can insert new key and delete the old one
Serenity
Can I use goto to move to any point in my program I would like to ? or are there some restrictions to using that ?
K
Anonymous
Serenity
Why ?
Anonymous
Do u all geeks always talk about programming?
Anonymous
Why ?
https://stackoverflow.com/questions/3517726/what-is-wrong-with-using-goto
Sasuke
Isn't there any library for webp? I wanted to convert .jpg/.png images into webp. I googled about it and no library found
Serenity
else if (user_choice == 2)
{
printf(update_product_category);
get_string(product_category, MAX_CATEGORY_LENGTH);
strcpy(super->product_list[product_index]->product_category,product_category);
}
Serenity
Does anybody have any idea why it skips the get_string function ? ( This function receives an input from the user)
Serenity
I tried Scanf instead and it has also done the same problem.
Anonymous
Anonymous
This is a very common issue in C, input from previous stdin comes back
Serenity
How can I handle it ?
Serenity
I replaced the function with scanf that gets integers ( it's not what I need) and it worked out..
Serenity
But as I replace it with scanf that receives a string , it's still skipped over..
Anonymous
https://man7.org/linux/man-pages/man3/readline.3.html
miko
Hey guys
miko
If u have worked with graphics.h in c++, could plz help me?
miko
miko
but I think it should print me a circle
Francisco
Just use other graphic library like SFML, SDL2, WxWidgets, GTK, etc
Ash
Please mention the path of the graphics files in the " " in initgraph method
miko
Anonymous
Hey i got a quick question: i need to call a c++ function from an __asm block. That does work but whenever i return the c++ code left artifacts and the following asm code doesnt work properly anymore. I tried pushing all registers to stack and restoring them when i return. But that seams to crash as well. Dint have the time yet to properly debug it to see what happens exactly but maybe this is a more or less known problem and sb can guide me in the right direction.
Anonymous
the c++ function is a void without arguments
Anonymous
also tried just jumping to it returning manually
Anonymous
also tried to declare it as __declspec(naked)
Mar!o
Mar!o
And why cant you call the function just by normal C++? And wrap the inline ass3mbly around?
Mar!o
You can use enter and leave as high level procedure prologue codes
Mar!o
Mar!o
Anonymous
Anonymous
14•08
Mar!o
Anonymous
tried what you suggested. However it dorsnt work as it should so i guess i have to start propper debugging 😅 thanks for the suggestions tho.
.
Hey guys, quick question.
Today i got to learn about pointer to functions in C and generic pointers.
I found that using generic pointers can be extremely useful in some case.
However, I was unable to get the point behind using pointers to functions.
I understand that function pointers can be useful to pass functions as parameters to other functions. But, this can be done w/o function pointers concept, right? Is there better memory management if we use function Pointers? Am I missing something here?
.
That's a plausible reply! Thank you.
.
Because i got the point you were trying to make :-/
noop
How can I avoid the undefined behavior situation? Should I use the address of the first element?
scanf("%s", &name[0]);
Anonymous
should have the cdecl calling convention. However i just made a new thread that has a busy waiting for a change... its unelegant but it works 😅🤷♂️
Anonymous
yes. However the registers should be the same since i store them in variables of type size_t and after the func returns i restore them.