Anonymous
have chinese吗
Anonymous
my is china man
Anonymous
Is anybody there?
\Device\NUL
Bruh momento
Sai krishna
Hi
Sai krishna
I am getting segmentation fault error
Sai krishna
When I complie pls help guy
Sai krishna
Any one good in Llvm and clang?
Sai krishna
Plss
\Device\NUL
Before you ask again, search on google how to ask good question. https://stackoverflow.com/help/mcve this can help you to make a good question
Sai krishna
Sai krishna
Sai krishna
\Device\NUL
Group exist for learning, Pay $420 to unlock pm
Sai krishna
extern short var_16;
extern short arr_99[];
void test() {
if (!var_16)
#pragma clang loop unroll(enable)
for (short a = 5652; a; a += 2)
for (long b = 0; b < -6ULL; b += -18446744073709551612ULL)
arr_99[b] = 0;
}
Error:
> clang++ -O2 -c func.cpp
Segmentation fault
Sai krishna
\Device\NUL
Sai krishna
Yes
\Device\NUL
Yes
Why it has negative value ?
Sai krishna
But in ull Is postive value
\Device\NUL
unsigned data type can't hold negative numbers
Sai krishna
I want to slove this bug
Nothing
\Device\NUL
I also think if you want VLA you should use size_t not long
\Device\NUL
I dunno what will happen if we declare array with negative value size
Sai krishna
Can u explain clearly?
Sai krishna
I use gdb but I can't find bug
Sai krishna
I tired so many times
\Device\NUL
\Device\NUL
For people who are dm-ing me, buy me dakimakura first
Sai krishna
klimi
I use Arch
klimi
if you can provide telegram ID, that's enough (for identification, not for proof)
klimi
#ot also this is kind of a topic for offtopic group
Lucaca
Nice to meet U, guys
Lucaca
which method do you recommend for clearing stdin buffer after an input, I mean
while(getchar() != '\n')
continue;
would ask for an extra user input if there is nothing left in stdin buffer, and flush(stdin) is implement dependent, right?
\Device\NUL
Lucaca
Neat but the problem of asking for one extra input when buffer is empty at all still exists, right?
\Device\NUL
\Device\NUL
I assume you're using fgets() , if the user input isn't more than input limit, you shouldn't clear the input stream since the newline char is get into str, but if not you should clear the input stream until find EOF or newline
In this case, you can check if the last char before NULL char is newline or not.
Kσϝɾα
https://www.youtube.com/watch?v=TeduHyHdH3A
🙂
Yes
I use Arch
He told it is a C, not C++
I use Arch
1. You can return only one value from function but as I understand (I don't know C very well) you can create a struct with two Vectors.
2. I can't see using of written functions in the main.
3. I don't think it's good idea to create a function called "createVector" which will return two vectors. You can just create two vectors wherever you need it.
\Device\NUL
No you can't, the compiler warns me. warning: expression result unused [-Wunused-value]
\Device\NUL
Once the function has returned value, the data inside the func is destroyed, cmiiw. so you can't create any data unless inside main function or global variable
I use Arch
\Device\NUL
Anyway, i think the printf func is ignoring arguments since there's no type identifier
\Device\NUL
\Device\NUL
Ahhh, i speak too much ;-;
I use Arch
Did you mean pointers ?
No. And he doesn't use pointers as I see. He just want to return a value of Vector type and if it works the same way as in C++, value will be copied after returning. Or you was telling about variables scope?
\Device\NUL
\Device\NUL
ah, i forgot about static
I use Arch
I think you should read that
https://stackoverflow.com/questions/37489306/calling-a-function-in-printf-in-c
Kim
I use Arch
But you can't return two values in one time without putting it in one value somehow. And I can't understand why do you need a function that creates two vectors instead of creating them when you want to use ones
I use Arch
\Device\NUL
I use Arch
I use Arch
I use Arch
https://pastebin.com/jNHqunGv
I wrote it in Telegram on my phone so something can be a little wrong written but I believe you can fix simple mistakes
Kim
Let me der and i tell u
Kim
It works
I use Arch
You are welcome
Anonymous
Hi guys how are you?
Anonymous
Well, this is not completely related to C/C++ but could be resolved with any language...
D
Can someone suggest me the best online course to learn c++
D
xypher
AmR
I try build boost form .7z file But I can't make funded by cmake find pkg I try both FetchContent ExternalProject , My code https://pastebin.com/kUytrdzx
klimi
Ehsan
Ehsan
PCs/Laptops are 🙂