Nitesh
Anonymous
They are both very good.
Nitesh
you need to choose both compiler and toolkit when you install qt
Will I have to reinstall qt creator for setup correctly?
M.Khorram
have installed in from online repository? (I install the offline version)
Nitesh
From where can I get the offline version??
 Mohsen
hey guys, I declared an array and a pointer globaly now I can assign the address of the array like below when I do it Under main() : ptr = array ; but if I want to do that assignment globaly too, I should do it this way : int * ptr = array ; what's the reason ?
M.Khorram
From where can I get the offline version??
you need not to install offline version. I did that because I was trying to install it for several times. you should install only a few things
M.Khorram
Nitesh
you need not to install offline version. I did that because I was trying to install it for several times. you should install only a few things
Sir please tell me how Can I get the offline version. On qt site there is no any option to download the offline version.🙏
Nitesh
I'll keep it in mind 😊.
M.Khorram
I'll keep it in mind 😊.
you can google "qt offline installer", the first result would be this one: https://www.qt.io/offline-installers
M.Khorram
I'll keep it in mind 😊.
note that you don't need offline installer until you don't need to install it multiple times
M.Khorram
Don Peter Joseph
#include<stdio.h> #include<stdlib.h> #include<conio.h> struct poly{ int coeff; int exp; }*p1,*p2,*p3; main(){ int n1,n2,n3,i,j=0,k=0; printf("enter the no of terms of two polynomials:"); scanf("%d%d",&n1,&n2); p1=(struct poly*)malloc(n1*sizeof(struct poly)); p2=(struct poly*)malloc(n2*sizeof(struct poly)); printf("enter the total no of different exponents in the two polynomials:"); scanf("%d",&n3); p3=(struct poly*)malloc(n3*sizeof(struct poly)); printf("enter the coefficient and exponent of first polynomial in decreasing order of exponents:"); for( i=0;i<n1;i++) scanf("%d%d",&p1[i].coeff,&p1[i].exp); printf("enter the coefficient and exponent of second polynomial in decreasing order of exponents:"); for(i=0;i<n2;i++) scanf("%d%d",&p2[i].coeff,&p2[i].exp); for(i=0;i<n1&&1<n2;i++){ if(p1[i].exp>p2[j].exp) { p3[k].exp=p1[i].exp; p3[k].coeff=p1[i].coeff; k++; } else if(p1[i].exp<p2[j].exp){ p3[k].exp=p2[j].exp; p3[k].coeff=p2[j].coeff; k++; j++; } else{ p3[k].exp=p1[i].exp; p3[k].coeff=p1[i].coeff+p2[j].coeff; k++; j++; } } while(i<n1){ p3[k].coeff=p1[i].coeff; p3[k].exp=p1[i].exp; k++; i++; } while(i<n2){ p3[k].coeff=p2[j].coeff; p3[k].exp=p2[j].exp; k++; j++; } printf("the resultant polynomial is :"); for(i=0;i<n3;i++){ printf("%d*x^%d ",p3[i].coeff,p3[i].exp); if(++i<n3) printf("+"); } }
Thierry
Ouch
Don Peter Joseph
#include<stdio.h> #include<stdlib.h> #include<conio.h> struct poly{ int coeff; int exp; }*p1,*p2,*p3; main(){ int n1,n2,n3,i,j=0,k=0; printf("enter the no of terms of two polynomials:"); scanf("%d%d",&n1,&n2); p1=(struct poly*)malloc(n1*sizeof(struct poly)); p2=(struct poly*)malloc(n2*sizeof(struct poly)); printf("enter the total no of different exponents in the two polynomials:"); scanf("%d",&n3); p3=(struct poly*)malloc(n3*sizeof(struct poly)); printf("enter the coefficient and exponent of first polynomial in decreasing order of exponents:"); for( i=0;i<n1;i++) scanf("%d%d",&p1[i].coeff,&p1[i].exp); printf("enter the coefficient and exponent of second polynomial in decreasing order of exponents:"); for(i=0;i<n2;i++) scanf("%d%d",&p2[i].coeff,&p2[i].exp); for(i=0;i<n1&&1<n2;i++){ if(p1[i].exp>p2[j].exp) { p3[k].exp=p1[i].exp; p3[k].coeff=p1[i].coeff; k++; } else if(p1[i].exp<p2[j].exp){ p3[k].exp=p2[j].exp; p3[k].coeff=p2[j].coeff; k++; j++; } else{ p3[k].exp=p1[i].exp; p3[k].coeff=p1[i].coeff+p2[j].coeff; k++; j++; } } while(i<n1){ p3[k].coeff=p1[i].coeff; p3[k].exp=p1[i].exp; k++; i++; } while(i<n2){ p3[k].coeff=p2[j].coeff; p3[k].exp=p2[j].exp; k++; j++; } printf("the resultant polynomial is :"); for(i=0;i<n3;i++){ printf("%d*x^%d ",p3[i].coeff,p3[i].exp); if(++i<n3) printf("+"); } }
what is the problem here.i am not getting expected output.addition of polynomials.
 Mohsen
I can but have to do it like this : int * ptr = array ; take a look at the code below : #define SIZE 4 int arra[SIZE] = {1,2,3,4} ; int arrb[SIZE] = {5,6,7,8} ; int * pta =arra ; // assining arra's address to pointer int * ptb; int main(){ ptb = arrb ; //assining arrb's address to pointer int i; for ( i = 0; i < SIZE ;i++) { printf("%d\n",pta[i]); } for ( i = 0; i < SIZE ;i++) { printf("%d\n",ptb[i]); }
 Mohsen
aha , got it 👌👍 thanks alot 🙏
Anonymous
Hello, I'm googling for some document that speaks about "mixing standard c++ parallel algorithms with qt5 gui", please can anybody address (help to find, give a link) me?
Anonymous
Do anybody know about mixing standard c++ algorithms and qt5 gui?
Anonymous
using standard c++ parallel algoritms in a code with gui application without blocking the gui that can run with the main thread... I'm looking for some guide, but without success
Anonymous
I likec++ standard algorithms but how use them with Qt?
Anonymous
Anonymous
yes but, I'm using standard containers, this is not a problem
Anonymous
the problem is run a parallel algorithms from a gui application in qt
Anonymous
for example
Alex
the problem is run a parallel algorithms from a gui application in qt
could you give link for std parallel algorithms c++&
Vlad
the problem is run a parallel algorithms from a gui application in qt
std::for_each with parallel executuion policy?)
Anonymous
std::for_each with parallel executuion policy?)
👍 yes, if I try to have some feedback to update for example a progress bar, the gui results blocked. And I was looking for some document that describe in general what to do in similar cases
Anonymous
why not? I can update a progress bar in a main thread from a parallel for_each (multiple thread), it could be view in similar manner to update a vector values with a for_each
Alex
you should not block main thread, cause application will be freezed
Anonymous
yes, that's the problems, I'm looking to perform this in safe way? but, 🙁 without success
Anonymous
mmm, and pass to this thread, for example a lambda with a parallel for_each?
Alex
pass progress bar, or what do you need to update. do not forget to protect shared vars with mutex
Alex
or even do not pass gui elements, do staff in thread and then use QT signal to update gui element
Alex
https://doc.qt.io/qt-5/signalsandslots.html
Anonymous
I will try, many thanks
Anonymous
Help me i want a code
Anonymous
V01D
That is a picture, not a code
V01D
/report
Zigzag
/report screenshot
Why u report him?
V01D
Why u report him?
Read the rules
Roxifλsz 🇱🇹
/warn autism
Anonymous
Print increasing number of spaces, followed by alternating _ and |, followed by newline character
V01D
Print increasing number of spaces, followed by alternating _ and |, followed by newline character
Or you divide the screen into x and y coordinates and perform some checks in a for loop.
V01D
Which would look nicer than print print print print
V01D
If you're on windows you can also try Microsoft's Visual Studio (not vscode) and Dev C++, both free
Dev C++ is outdated af. Never use it, if you encounter errors no one will help
V01D
Really? Didn't knew, thanks
The rules actually say the same thing ;)
Nitesh
If you're on windows you can also try Microsoft's Visual Studio (not vscode) and Dev C++, both free
Sir, I didn't know that visual studio also used for c & c++. Actually I'm using it for ASP.NET.
Nitesh
Also works for F# C# and visual basic
Thank you. I'm going for C# and VB.NET after C++.
Talula
Thank you. I'm going for C# and VB.NET after C++.
VB? What kind of heretic talk is that?
Nitesh
V01D
Idk who would ever wanna use it, and why. The entire .NET family is cursed with CLR aka decompilers
Konstantin
Visual Basic.
I believe that was the whole point of "heresy" comment
Talula
Yes it is visual basic.
BURN!!! BURN in HELL...
Talula
VB SUCKS... Even though back in 1996, I started Windows programming using VB... but trust me it SUCKS.
Hadaward 'Solly'
everyone migrated to C#
Talula
C#
Hadaward 'Solly'
from VB, that is
Anonymous
C#
C++++
Anonymous
Do you all really think that .NET is ontopic here?
Z0OM
what happens if i delete a pointer to a structure with no destructor?