Anonymous
Lol, idk, it looks like it's a problem on your side, like OS or maybe bugged stdlib
Anonymous
What compiler do you use?
Anonymous
And the OS
Andrew
hi, is there a group like this for javascript?
Diego
I found this one on Google, you could try searching
Andrew
thank tyou
Pavel
What compiler do you use?
Ubuntu, not sure how to check which compiler cmake uses, but I suppose that it's gcc 10.2.0 I also think this is something either with my configuration or just something is broken
Pavel
Ubuntu, not sure how to check which compiler cmake uses, but I suppose that it's gcc 10.2.0 I also think this is something either with my configuration or just something is broken
here's the example that crashes for me https://github.com/gameraccoon/temp-thread-crash I think it also can be related to gdb configuration that my QtCreator uses, because if I run it with console gdb, then it doesn't crash (but I never used it from console before, so I can do something wrong)
Dima
lol
عبدالغفور
Hey Expert's, need your support to get it done. I'm running a small structure function program through VIsual Studio 2019... struct data { float amount; char fname [30]; char lname[30]; }rec; void print_rec (struct data displayRec); int main (void) { printf ("Enter the first and last names\n"); scanf_s ("%s %s", rec.fname, rec.lname); printf ("\n Enter the amount: "); scanf ("%f", &rec.amount); print_rec (rec); return 0; } void print_rec (struct data displayRec) { printf ("\nPerson %s %s gave $.2f.\n",displayEd.fname, displayRec.lname, displayRec.amount); } This program gives 3 warnings at VIsual Studio but works perfectly at Linux Terminal.... Please guide
armandofsanchez
Probably different compilers
عبدالغفور
Message appears as "Missing integers argument to 'scanf_s' that corresponds to conversion specifier '4'
عبدالغفور
Code no c6064
عبدالغفور
For VIsual Studio 2019
armandofsanchez
Google for it...scanf_s may need the number of chars to read
عبدالغفور
I tried sir but not getting specific
armandofsanchez
Missing integer argument to `scanf_s`- Error: C_Programming https://www.reddit.com/r/C_Programming/comments/jubis0/missing_integer_argument_to_scanf_s_error/?utm_source=amp&utm_medium=&utm_content=post_body
Vlad
I'm pretty sure it requires string length
عبدالغفور
I'm pretty sure it requires string length
Please clear with code so I can edit and try it
Vlad
You mean clarify or what?
عبدالغفور
S sir I'm newbie not an expert like you all
عبدالغفور
Sorry for trouble sir
Vlad
https://en.cppreference.com/w/c/io/fscanf
Vlad
It says that scanf_s expects two arguments for the %s specifier
Vlad
Second one being its length
Chr
What is scenarios and how to write scenario programming In c
Chr
Language
Chr
What is Inmemory database design
Talula
What is Inmemory database design
Data that is kept in memory and not saved on the drive, advantage: faster. Disadvantage: you lose data if the computer shuts down.
Anonymous
Anonymous
Try this
Vlad
Do scanf_s("%s",x,1)
One character string? Wut?
Anonymous
This new why
Sandro
#include <stdio.h> struct data { float amount; char fname [30]; char lname[30]; }; void print_rec (struct data displayRec); int main (void) { struct data rec; printf ("Enter the first and last names\n"); scanf ("%s %s", rec.fname, rec.lname); printf ("\n Enter the amount: "); scanf ("%f", &rec.amount); print_rec (rec); return 0; } void print_rec(struct data displayRec) { printf ("\nPerson %s %s gave %.2f.\n", displayRec.fname, displayRec.lname, displayRec.amount); }
Sandro
there is no reason to declare global variable, and there is some little errors, found them by your self
Vlad
Now there's buffer overrun vulnerability in your code
Sandro
Now there's buffer overrun vulnerability in your code
you're right but if you want use scanf_s() instead of scanf() to avoid overbuffer, you have to specify the vector size -1, in this example: scanf_s("%29s %29s", rec.fname, rec.lname);
Sandro
You can pass it's size as second parameter duh
have a look this: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l?view=msvc-160
Anonymous
I want a code to make a digital clock
chandler
where can I find some tests about design patterns?
Sandro
Sir! It's still unresolved....If I use scanf_s with buffer size 29, Exception thrown at 0x0FCEEFD9 (ucrtbased.dll) in Aitken_Jones_Day_11_6.c.exe: 0xC0000005: Access violation writing location 0x00DDB000. This error apear and debug stuck.
#include <stdio.h> int main() { char string[30]; puts ("Please enter a string of 20 characters or fewer."); scanf ("%29s", string); printf ("\nYou typed the following string:\n%s\n\n", string); return 0; }
Sandro
try this....any way scanf() is only for write C references books....there is no commercial software where scanf() is used.....there is a lot of safe input method over scanf()
Anonymous
how to print ascii art like that
Anonymous
* ** *** **** *****
Anonymous
Using C
mov $22, %rax
study C
Anonymous
I know
Anonymous
How to write it
mov $22, %rax
If you know do that...
Souvik
Hi
Anonymous
No idea about this process
z
No idea about this process
"To beat a hacker,You need to think like a hacker"
Souvik
#include<studio.h> Int main() { Int I,j; for(I=0;I<=4;I++) { for(j=0;j<=I;j++) { printf("*"); } printf("\n"); } return 0; }
Souvik
* ** *** **** *****
Ans above👆
彡 Aniket Rajput 彡
Implement your list interface using a fixed chunk of memory, say an array of size 100. If the user wants to add more stuff to your list than fits in your memory you should produce some kind of error, for example you can throw an exception if your language supports that
彡 Aniket Rajput 彡
彡 Aniket Rajput 彡
This is done by default by your programming language..if user's input excedes your memory then it will show the massage automatically
But the problem is that i have to make a list with can accept fix number of item but list has a property that its size automatic increases when new element is inserted so i can't set limit on list
Souvik
While taking the input you can put a if statement that if(n>100) then print an exception
Suraj
How to. Strat beginning learning c c++ free plz😭 suggest I am not buy course
HaiNahi
Anyone join the project. A game from real scratch.
HaiNahi
https://github.com/SwastikMajumder/cpurenderer