Anonymous
need help to add first and second Matrix to third Matrix
I_Interface
first matrix and second matrix to third matrix or 2d array .. can anyone help me
What the hell. Could you form text of your question normaly ?
Anonymous
okay
I_Interface
okay
And show the code what you have done till now.
Anonymous
i want to add 3×3 Matrix of 1 & 2 to 3
Anonymous
that's my problem
Anonymous
can you tell me this code
Till
i want to add 3×3 Matrix of 1 & 2 to 3
what's you problem?! I want to see your code!
Anonymous
Anonymous
That's my code
Till
I can not see anything, please. share your code on the pastebin
Anonymous
#include<stdio.h> #include<conio.h> void main() { int a[3][3],i,j; for(i=0;i<=2;i++) { for(j=0;j<=2;j++) { printf("Enter Array Elements: "); scanf("%d",&a[i][j]); } } printf("\n Matrix is :\n"); for(i=0;i<=2;i++) { for(j=0;j<=2;j++) { printf("%d\t",a[i][j]); }
Dima
i will never write you 😹
Why would you hate Till
Dima
Dudka
Anonymous
Why would you hate Till
he was banned me 😄
Anonymous
syntax error
how can i add first and second array to third array can you please tell me
Till
how can i add first and second array to third array can you please tell me
in for-loop third[i][j] = first[i][j] + second[i][j];
Anonymous
Thank You ❤️
Ludovic 'Archivist'
Forgot to delete it. And he was using printf in C++ code idk why.
Even in C, please, do not use the formatting functions, they are deadly trash. Those functions are the rusted barb wire that you keep in the back of you cramped garage in case it gets useful
Vitaliy ◀️TriΔng3l▶️
They just work and are simple to use, why not?
Ludovic 'Archivist'
They just work and are simple to use, why not?
Because they tend to lead to enormous and easy to exploit security weaknesses
Anonymous
I tried so many times! What's the error is any one know!
Anonymous
STATEMENT MISSING ;
How can I solve?
Mat
What could the error be?!
Anonymous
How can I solve?
I think you have to write std:: before cout
Mat
How can I solve?
Add the damn ; at the end of the statement. Is it really so difficult?
Anonymous
And add ; after clrscr
Mat
I think you have to write std:: before cout
The fact he didn't get what he's writing is another problem
MilkBeforeCereal
I think you have to write std:: before cout
isn't it part of iostream
Anonymous
isn't it part of iostream
I don't think so I work on Dev C++ and it's not compiling I add std:: before (cout, cin, endl) or add "using namespace std;" above main function
Anonymous
The fact he didn't get what he's writing is another problem
I'm new in programming section. That's why it's difficult for me.
Francisco
I'm new in programming section. That's why it's difficult for me.
The first lesson you should take is don't ever use Turbo C++
Anonymous
Francisco
Depends on what operating system you're using
Francisco
Microsoft Visual Studio is the best. There's others like CodeBlocks, VSCode, CLion...
Anonymous
Windows.
Use Dev C++ or Code::Blocks
Francisco
Anonymous
Francisco
Why???
Because it's outdated (?)
Deni
Because it's outdated (?)
If you live in 2005 isn't
Vitaliy ◀️TriΔng3l▶️
Use Dev C++ or Code::Blocks
Why would you use those things only suitable for freshman lab works?
Vitaliy ◀️TriΔng3l▶️
(not even for them actually)
Vitaliy ◀️TriΔng3l▶️
There's Visual Studio 2019, with an easy to use debugger, with Concurrency Visualizer, with source control integration
Anonymous
Guys thanks for your support 💙.
Anonymous
Why would you use those things only suitable for freshman lab works?
I'm not using any Idea, I'm using make files on Linux OS but Dev C++ was my best IDEA when I was fresh
Francisco
I lasted with Dev C++ like 3 months. Then I moved to Linux and since then I use Atom + gcc/clang
Anonymous
Any correction?
Anonymous
Any correction?
It doesn't compile lol
Anonymous
Any correction?
; after "enter tow numbers"
Anonymous
iostream.h is not standard C++ void main is not standard C++ conio.h is just a piece of shit
Anonymous
Cout and Cin are not defined in your program
Francisco
Reason?
Just plug it into the compiler and see the results
Anonymous
#include<iostream> int main() { int first = 0, second = 0; std::cin >> first >> second; std::cout << first + second; }
Francisco
int a = void;
Francisco
Something like that
Anonymous
And why do you need that?
Anonymous
int a = void;
[[uninitialised]] int a;
Francisco
That's another option
Francisco
Doing that, you explixitly tell the compiler that the variable is uninitialized on purpose
Anonymous
I think that variables must be initialized always
Anonymous
Francisco
I think that variables must be initialized always
I agree, but sometimes doesn't make any sense to initialize it, like reading from cin
Francisco
Why would you initialize a variable to a value you know is garbage? Just let the compiler know it is initialized so it can give better warnings