![]() |
Matrices and Defining my Array Question
This code is to add two Matrices.
Updated code: On the next reply. Any help will be appreciated. Thanks. |
This is my updated code:
Thanks guys, seems better but I think :
#define maxrow 10Is causing some problems. :
#include <cstdlib>Errors: --------------------Configuration: Cpp1 - Win32 Debug-------------------- Compiling... Cpp1.cpp C:\Documents and Settings\Admin\Desktop\1DataStructure Assig1\Cpp1.cpp(17) : error C2062: type 'int' unexpected C:\Documents and Settings\Admin\Desktop\1DataStructure Assig1\Cpp1.cpp(17) : error C2238: unexpected token(s) preceding ';' C:\Documents and Settings\Admin\Desktop\1DataStructure Assig1\Cpp1.cpp(33) : error C2065: 'cout' : undeclared identifier C:\Documents and Settings\Admin\Desktop\1DataStructure Assig1\Cpp1.cpp(33) : error C2297: '<<' : illegal, right operand has type 'char [42]' C:\Documents and Settings\Admin\Desktop\1DataStructure Assig1\Cpp1.cpp(34) : error C2061: syntax error : identifier 'cin' C:\Documents and Settings\Admin\Desktop\1DataStructure Assig1\Cpp1.cpp(38) : error C2143: syntax error : missing ')' before 'do' C:\Documents and Settings\Admin\Desktop\1DataStructure Assig1\Cpp1.cpp(39) : error C2297: '<<' : illegal, right operand has type 'char [41]' C:\Documents and Settings\Admin\Desktop\1DataStructure Assig1\Cpp1.cpp(40) : error C2061: syntax error : identifier 'cin' C:\Documents and Settings\Admin\Desktop\1DataStructure Assig1\Cpp1.cpp(44) : error C2146: syntax error : missing ')' before identifier 'cout' C:\Documents and Settings\Admin\Desktop\1DataStructure Assig1\Cpp1.cpp(44) : error C2297: '<<' : illegal, right operand has type 'char [35]' C:\Documents and Settings\Admin\Desktop\1DataStructure Assig1\Cpp1.cpp(46) : error C2065: 'i' : undeclared identifier C:\Documents and Settings\Admin\Desktop\1DataStructure Assig1\Cpp1.cpp(47) : error C2065: 'j' : undeclared identifier C:\Documents and Settings\Admin\Desktop\1DataStructure Assig1\Cpp1.cpp(48) : error C2065: 'cin' : undeclared identifier C:\Documents and Settings\Admin\Desktop\1DataStructure Assig1\Cpp1.cpp(48) : error C2296: '>>' : illegal, left operand has type 'float' C:\Documents and Settings\Admin\Desktop\1DataStructure Assig1\Cpp1.cpp(48) : error C2297: '>>' : illegal, right operand has type 'float' C:\Documents and Settings\Admin\Desktop\1DataStructure Assig1\Cpp1.cpp(50) : error C2297: '<<' : illegal, right operand has type 'char [36]' C:\Documents and Settings\Admin\Desktop\1DataStructure Assig1\Cpp1.cpp(54) : error C2065: 'B' : undeclared identifier C:\Documents and Settings\Admin\Desktop\1DataStructure Assig1\Cpp1.cpp(54) : error C2228: left of '.data' must have class/struct/union type Error executing cl.exe. Cpp1.exe - 18 error(s), 0 warning(s) |
OK... first off, why do you use two different sets of constants for the maximum number of rows and columns?
Anyway, to fix the errors:
|
| All times are GMT -5. The time now is 6:15 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC