473,473 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

An allocated double array question

2 New Member
I'll be most thankful if someone could help me with the following:

1. A double array is declared and allocated in an object's constructor

class Snapshot
{
private:
double **Coord; // The atoms coordinates
.
.
.

2. this array should be accessed via

double Snapshot::GetCoor()
{
return Coord;
}


3. The array should than be passed from within its object to a function

for(int i = 0; i < SnapshotList.size(); i++)
{
double Rmsd = GetRMSD(SnapCoor, SnapshotList[i].GetCoor());
}
}

where GetRMSD's header is

double GetRMSD(double A[][DIMENSION], double B[][DIMENSION])


Of course this does not work. I'll be most thankull for any suggestion made.

Thanks allot

Arik
Sep 25 '09 #1
2 1800
donbock
2,426 Recognized Expert Top Contributor
Take a look at Arrays Revealed. It should help.
Sep 25 '09 #2
acohen
2 New Member
Thanks allot for the ultrafast response and help.

Arik
Sep 25 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: C++fan | last post by:
Hi all: I have a question about memory allocation to an object of a class. For example, I define the following class: class example_class{ public: example_class(); void funtion_1();
7
by: masood.iqbal | last post by:
I am having lots of trouble getting a simple program that initializs a dynamically allocated 2D array to work. My 2D array is not getting initialized properly, and additionally I am getting a...
2
by: Jonathan Underwood | last post by:
Hi I have a 2 dimensional array allocated as a contiguous chunk of memory, as described in Question 6.16 in the FAQ (i.e. in the manner of array 2 on the page...
31
by: bilbothebagginsbab5 AT freenet DOT de | last post by:
Hello, hello. So. I've read what I could find on google(groups) for this, also the faq of comp.lang.c. But still I do not understand why there is not standard method to "(...) query the...
5
by: nmtoan | last post by:
Hi, I could not find any answer to this simple question of mine. Suppose I have to write a program, the main parts of it are as follows: #include <blahblah.h> struct {
3
by: johnmann56 | last post by:
Hello. I have a small C# program which uses a number of large arrays of double. The program runs fine on my desktop PC which has 2 GB of memory, but when run on my laptop with 512 MB the laptop...
11
by: mast2as | last post by:
This question has been posted to this forum before and I read the thread but found that the answers were perhaps imcomplete, so I am trying again. Whenever I am creating objects I would like to...
1
by: mattmao | last post by:
Hello everyone, this is my first thread in this .NET forum. Since I am studying C#.NET in this semester, I reckon this would be just the right place for my asking questions regarding the C#...
7
by: runn | last post by:
Can a class has a member array which will be dynamically allocated during runtime? Such as double* A=new double here n is an integer member variable and will be determined during runtime and...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.