|
[Sponsors] |
Problem with declaring an object of a certain class |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 10, 2018, 19:37 |
Problem with declaring an object of a certain class
|
#1 |
Member
Join Date: Apr 2016
Posts: 30
Rep Power: 10 |
Hi all,
This is a pretty basic but I need some help. I want to access a member function called GaussNormal() inside the Random class. So I first created a object rnd of class Random.Then called the member function. The following is what I wrote Code:
Random& rnd; scalar rn = rnd.GaussNormal(); Code:
In file included from twoPhaseEulerFoam.C:107:0: pU/UEqns.H: In function ‘int main(int, char**)’: pU/UEqns.H:27:13: error: ‘rnd’ declared as reference but not initialized Random& rnd; ^ pU/UEqns.H:28:33: error: no matching function for call to ‘Foam::Random::GaussNormal()’ scalar rn = rnd.GaussNormal(); Your help in this matter is greatly appreciated. Thanks and Regards, Shantanu Vachhani |
|
Tags |
class, constructor, object, random, twophaseeulerfoam |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
strange problem with data | seav | OpenFOAM Running, Solving & CFD | 0 | April 11, 2014 06:01 |
CCL / Monitor Object Problem | James Date | CFX | 4 | September 29, 2010 03:23 |
ParaView 3.8.0 problem on debian | Unseen | OpenFOAM Installation | 4 | August 16, 2010 11:26 |
looking for radiation problem with `floating' object | mirko | OpenFOAM | 0 | June 30, 2010 17:51 |
[blockMesh] BlockMeshmergePatchPairs | hjasak | OpenFOAM Meshing & Mesh Conversion | 11 | August 15, 2008 08:36 |