Supose two matrices are there a and b we scanned the element in a matrix and b is the transpose of former . NOW
when we write a code to assign the values we use
but when we do b[j][i]=a[i][j] it gives a wrong result why? since in both the cases all assigning cases are same.
This should be very easy to trace in a debugger. You don't even tell in which way the result is wrong, and you do not show the declaration to fhe two matrices, so there is really not much information to make a qualified guess.
So you wanted to print the value of b[i][j] after you updated b[j][i]?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
I have an existing MFC application in which there are many tags that changes continuously.
I have to show the value of 2 tags which changes dynamically. I have to plot an XY plot for the tags in a separate dialog or window in the existing MFC application.
Please suggest me some easiest or quickest ways of doing the above task.
There are many good articles about drawing in mfc - which is really pretty much Win32. Rather than have that magical moment where you get it running and it flickers constantly, make sure to look into double buffering with a bitmap.
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
You may use either the legacy rand()[^] function (with the srand one you might provide the seed), or the classes provided by the 'new' random header[^]. The latter is more sophisticated and has a somewhat more difficult interface. You might look at code samples, though, for instance, see the code in this page[^].
Last Visit: 22-Sep-20 15:09 Last Update: 22-Sep-20 15:09