Anonymous
What appropriate input function for string should i use to store value into an empty array? And how? 😬
Anonymous
In C
Anonymous
Anonymous
Victor D.
Victor D.
Like scanf("%s",szArray);
Vlad
Vlad
Consider using fgets or gets_s for the string input
Vlad
scanf("%s", string) isn't safe
Vlad
many
Are there any high speed and lightweight c++ libraries for logging?
Igor🇺🇦
Ahmad
can any one make copy constructor for doubly linked list please
Anonymous
Hi everyone...!!!
Is there any c++ programmer?
Anonymous
Vlad
Anonymous
Anonymous
many
Hiring?
Anonymous
Anonymous
Anonymous
Lol
Dima
lol
Ange
Is anyone trading on iq option ?
MLDA
Hello how to add numbers for new empty array
Ange
If its an int array use a for loop
MLDA
Olexiy
/get cbook
Anonymous
🇵🇭🇷🇺
🇵🇭🇷🇺
Thanks 🙁
Diego
Scarlett
Try to use ` ``
for code, before and after, so it looks like
myClass{
int val = 0;
};
Also for long things try to use https://gist.github.com/
Diego
Diego
If you wish to validate then add an extra if that checks if it's less than 101, if so, output that it's invalid
🇵🇭🇷🇺
But it keeps on appearing that 89-100 is undefined
🇵🇭🇷🇺
Diego
Paste the code in the big text box, add a description or a filename optionally
Diego
Then just click create and it'll give you a link
V
Hey everyone, ¿how are you? I need some help on one particular issue.
I'm very new on programming, not even a year on this. So please bear with me. I'll try to explain the best way I can my issue.
V
Its kinda long explanation, so I asked for permission to admin Dima and said its okay.
Anonymous
```#include <stdio.h>
#include <string.h>
int main(){
const int SIZE = 100;
char letter [SIZE];
int num,i;
int num2;
scanf("%d", &num);
for(i=0; i<num; i++){
scanf("%c", &letter[i]);
}
scanf("%d", &num2);
int index=num2;
printf("%c", letter[index]);
return 0;
}```
Anonymous
Why does the loop count twice?
Diego
Try this out
I put your get grade code into a function, and UserNumber is now an argument
I use a foor loop that stops when i > 150 and each loop adds 5 to i
Should be much easier to see where the mistake is
Diego
It seems to be every time there's a 10th number; maybe the problem is using > and < rather than >= and <=
Try out changing those where you see it relevant
Terror
Hey guys! I'm new to c++ ,while I'm reading the book c++ primer, I try to do some experiment with the problem 12.24, but there's something out of my expect and made me confused, here is my code
#include <iostream>
int main(int argc, char* argv[])
{
char * a = new char[10];
std::cin >> a;
std::cout << a << std::endl;
delete [] a;
return 0;
}
Terror
after compiling it I tried to enter some string longer than 10 but still got the full string
Terror
Is there something wrong with my code or just compiler's magic?
.
Hi can you help me in the exams c++?
Terror
Terror
https://stackoverflow.com/questions/36517571/cin-writing-out-of-range
Anonymous
سگ توش ادم تا میخاد درس بخونه همه چی بهش خوش میاد همین الان میخواستم لپ تاپو تمیز کنم کیر توش
J
?
z
Anonymous
Anonymous
Anonymous
Please take Jetbrains Developer Ecosystem Survey 2021
Let's make developer tools better
https://surveys.jetbrains.com/s3/developer-ecosystem-survey-2021-sh?pcode=966683602426201088
Ali
Why does the loop count twice?
%c does not skip white-space before converting a character
scanf(" %c", &letter[i]);
Try adding a space before %c in scanf like above
Anonymous
Nils
Anonymous
Like what?
Open the link, it listed there
ʙᴀнᴀᴘᴀм
any C developers here?
Anonymous
Dima
ʙᴀнᴀᴘᴀм
Anonymous
Jesvi
Hi
klimi
Anonymous
Evil grin
Is there a centralised place to find 3rd party libs to do whatever you want
Evil grin
Like npm
Anonymous
Anonymous