|
[Sponsors] |
December 18, 2014, 19:13 |
Pointer assignment issues
|
#1 |
New Member
Stefanie
Join Date: Oct 2014
Posts: 7
Rep Power: 11 |
I am having issues with a pointer...
Code:
scalar *Bt_ptr; //protected member of a class (MyEvaporation) //initialization to the NULL pointer in the constructor of the class Code:
void Foam::MyEvaporation::calculate(..) { scalar Bt=10; //really is being calculated iterativly… Bt_ptr= &Bt; } Code:
Bt_ptr -> Bt; Code:
(this->Bt_ptr) -> Bt; I’m always getting that same error “request for member ‘Bt’ in '*(…)Foam::MyEvaporation::Bt_Ptr, which is of non-class type 'Foam::scalar {aka double}' ” PLEASE!!!! HELP!!! Thanks so much! Stef |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFD by anderson, chp 10.... supersonic flow over flat plate | varunjain89 | Main CFD Forum | 18 | May 11, 2018 07:31 |
Pointer Initialization | SprayStef | OpenFOAM Programming & Development | 0 | December 17, 2014 13:58 |
Multigrid Stability Issues | ThomasHermann | SU2 | 1 | November 5, 2014 16:18 |
Segmentation Fault caused by a pointer | floquation | OpenFOAM Programming & Development | 1 | October 17, 2014 11:43 |
PtrDictionary: pointer with structure (order) of mesh | maybee | OpenFOAM Programming & Development | 0 | February 11, 2014 04:27 |