473,383 Members | 1,822 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

this->(i,j) doesnt work but this->_ij_val(i,j) does

In class Matrix, I rather have just
virtual T& operator () (int i, int j)
{
}

since
virtual T& operator () (int i, int j)
{
}
and
virtual T& _ij_val(int i, int j)
{
}

do the same thing (accessing an element in my matrix) but I need both
since
init(int i, int j, int value)
{
this->(i,j)=value //compile error
this->_ij_value(i,j)=value //ok
}

Why doesnt it work??? Any solution???

Jul 23 '05 #1
1 1217
<bl**********@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
In class Matrix, I rather have just
virtual T& operator () (int i, int j)
{
}

since
virtual T& operator () (int i, int j)
{
}
and
virtual T& _ij_val(int i, int j)
{
}

do the same thing (accessing an element in my matrix) but I need both
since
init(int i, int j, int value)
{
this->(i,j)=value //compile error
this->_ij_value(i,j)=value //ok
}

Why doesnt it work??? Any solution???


The synatx you are using is not supported. (look a few posts down) Ie.
this->(i,j) is not the syntax to call the member operator(). You can fix it
by either typing (*this)(i,j), or this->operator()(i,j).
--
Regards,

Ferdi Smit
smit xs4all nl
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Savas Ates | last post by:
CREATE PROCEDURE st_deneme @userid numeric (18) ,@result numeric (18) output AS select * from users return "10" GO **************************** <!--METADATA TYPE="typelib" NAME="Microsoft...
6
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: ...
1
by: Station Media | last post by:
Hi, here my problem, i use stored procedure in ACCESS database(latest version), and i would like to use this procedure but it doesnt work, do you know why ? Procedure: PARAMETERS MyField Text...
3
by: Clouds | last post by:
Hi ! How do I add the dynamic event handler for a dropdownlist present in the itemtemplate of a datalist !! I am doing it in the itemdatabound event of the datalist but it doesnt work... I am...
0
by: Juna | last post by:
I have been working in vs2003, but now started to work in vs2005 but the problem, I have simple web application not website, which work i mean open in browser when we press F5 or run the...
3
by: jx2 | last post by:
hi guys i would appriciate your coments on this code - when i ran it for the very first time it doesnt see @last = LAST_INSERT_ID() but when i ran it next time it read it properly i need to know it...
3
by: thread | last post by:
hi all, i'm trying to hide by database with this code: Application.CurrentDb.TableDefs(CurrentDb.TableDefs(i).Name).Properties("Attributes").Value = dbhiddenobject from some reason it doesnt...
1
by: Dany13 | last post by:
hi all. i using some text box for input value and some localvarible for passing this data to dataset . give instance for correct row of dataset and data in data table . use one gird view for...
20
by: Hush | last post by:
Hi, The following code works fine in IE7 but FF returns with an error: Access denied to achieve the property Element.firstChild. In this line: nodes = xmlDoc.documentElement.childNodes; My...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.