| |
| View previous topic :: View next topic |
| Author |
compile error in vector.cpp (255) |
admin Site Admin
Joined: 07 Dec 2006 Posts: 119 Location: Amsterdam, The Netherlands
|
Posted: Thu Jan 28, 2010 8:21 am Post subject: |
|
|
array and matrix classes
| Description: |
|
 Download |
| Filename: |
Array.cpp |
| Filesize: |
2.69 KB |
| Downloaded: |
76 Time(s) |
| Description: |
|
 Download |
| Filename: |
Array.hpp |
| Filesize: |
1.47 KB |
| Downloaded: |
59 Time(s) |
| Description: |
|
 Download |
| Filename: |
Matrix.hpp |
| Filesize: |
1.9 KB |
| Downloaded: |
59 Time(s) |
| Description: |
|
 Download |
| Filename: |
Matrix.cpp |
| Filesize: |
3.85 KB |
| Downloaded: |
58 Time(s) |
|
|
| Back to top |
|
 |
Cuchulainn

Joined: 18 Dec 2006 Posts: 461 Location: Amsterdam, the Netherlands
|
Posted: Sun Mar 22, 2009 7:52 pm Post subject: |
|
|
In NumericMatrix the member function Element() was coded incorrectly. I use (,) operator overloading.
Here is the new source. Hope it helps.
| Description: |
|
 Download |
| Filename: |
NumericMatrix.hpp |
| Filesize: |
1.89 KB |
| Downloaded: |
172 Time(s) |
| Description: |
|
 Download |
| Filename: |
numericmatrix.cpp |
| Filesize: |
6.25 KB |
| Downloaded: |
161 Time(s) |
|
|
| Back to top |
|
 |
nuclph
Joined: 07 Nov 2008 Posts: 5
|
Posted: Sat Nov 08, 2008 3:56 pm Post subject: compile error in vector.cpp (255) |
|
|
Hello,
I have small question with respect to Vector.cpp file.
I am getting compile error such as:
vector.cpp(255) : error C2059: syntax error : ')'
this line looks like:
template <class V, class I, class S>
Vector<V, I, S>& Vector<V, I, S>:perator += (const Vector<V, I, S>& v)
{ // Add the elements
for (I i=MinIndex(); i<=MaxIndex(); i++)
(*this) = (*this) + v); // 255 line
return *this;
}
I am using Visual Studio 2008 to compile files.
Below, Vector.hpp and Vector.cpp versions which I have from Financial Instrument Pricing Using C++.
For some reasons, compiler does not understand this line.
Thank you in advance for the reply.
nuclph
| Description: |
|
 Download |
| Filename: |
Vector.hpp |
| Filesize: |
3.59 KB |
| Downloaded: |
173 Time(s) |
| Description: |
|
 Download |
| Filename: |
Vector.cpp |
| Filesize: |
8.47 KB |
| Downloaded: |
174 Time(s) |
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|