Anonymous
Can i know how to display data in mini project
Reeta
Igor🇺🇦
mov $22, %rax
Anonymous
Ok
Anonymous
Am beginner please guys can any one teach me c++
Igor🇺🇦
char**
There is no string in C. char** is a pointer to char*, not string.
Igor🇺🇦
mov $22, %rax
char* can hold a string of charachters
Anonymous
Ok who will teach me please
mov $22, %rax
that's what a string is
Igor🇺🇦
that's what a string is
char* just points to some data. It can be an array of characters without \0 and none of the str methods will work correctly. Or it can point to some random data that was casted to char*. It's not like C++ string that "knows" what it contains and were it ends.
mov $22, %rax
Anonymous
Ok who will teach me please
A better way to learn any prog language is by writing the program,
Start to code, compile & run, debug, compile and run again..... 🙂
Anonymous
Ok 👌 i dm you
Anonymous
Int main(){
Printf(" can bot ban people automatically?");
Return o;
}
Hanz
Nisal
I just need some explanation anyway thanks for your explanation @kyoko687 and sorry for disturbing you @K11M1 if you dont like to help you can ignore
klimi
Nisal
Anonymous
Anonymous
Anonymous
Is there any changes or meaning change?
Hanz
Georges
Hello, i need to implement a parallel multithreaded version function to check if the input is a palindrome in c++
Vlad
Vlad
Your strings must be ridiculously long if you consider doing that in parallel. So long in fact that they are probably almost never a palindrome
Georges
Yeah but i need to do it
Vlad
Split a half of an array into parts
Vlad
Give to different threads
Vlad
Make an array of bool of results
Vlad
Whether that part was a palindrome or not
Vlad
Then check that all elements are true in the main thread
Vlad
Or you may use atomic<bool> but it might be slower
Georges
No i don’t want it slower
Georges
I got the idea thank you
Vlad
Vlad
It may actually be faster depending on the input
Georges
Oh okay
Diego
Or worse still, data corrupting prone; since at least deadlocks are easy to diagnose
Georges
I understood thanks guys
Diego
Suraj
Hi friends
Amohelang
MR᭄HACKER࿐
Hlo
Georges
Hello, i need to implement a parallel multithreaded version of inner_product which computes the dot product of two ranges in c++
Vlad
Vlad
You mean 2d vectors?
Georges
Yes
Vlad
Well vector has 2 members. X and Y
Vlad
What are you gonna parallelise?
Georges
Here i am using two 1D vectors, not a 2d vector
Igor🇺🇦
Vlad
Not the math vector
Georges
Yeah
Vlad
Yeah
So. Dot product is calculated using two-component math vector
Georges
True
Vlad
The thing is. They are unrelated :P
yd
Hello everyone, I got a C program and it worked well on Linux. However, I found it was extremely slow on windows ( I used MinGW to build for windows).
yd
Would anyone teach me how to fix the issue? Thanks .
Vlad
Vlad
Profile the program on windows
Georges
The signature of the function that i should use is the following:
template <typename Iterator>
double inner_par(Iterator first1, Iterator last1, Iterator first2, Iterator last2) {
return 0;
}
Vlad
So you'd at least know where it's slow
yd
I only used the c89 stand library.
Vlad
yd
I guessed that maybe one of the three reasons: Malloc, fopen, math .
yd
I did not used posix. The program did some scientific computation.
Pavel
Vlad
yd
It is like grab some data from a csv file and compute something and then fputs to a new csv file.
yd
Loop file write/read many times.
Vlad
Also make sure that optimization flags and all of that are the same
Vlad
You could be comparing debug with release
Vlad
And of course debug would be slower