| View previous topic :: View next topic |
| Author |
compile error in vector.cpp (255) |
Cuchulainn

Joined: 18 Dec 2006
Posts: 318
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: |
6 Time(s) |
| Description: |
|

Download |
| Filename: |
numericmatrix.cpp |
| Filesize: |
6.25 KB |
| Downloaded: |
4 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: |
30 Time(s) |
| Description: |
|

Download |
| Filename: |
Vector.cpp |
| Filesize: |
8.47 KB |
| Downloaded: |
22 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
|