CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Pointer assignment issues

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 18, 2014, 19:13
Default Pointer assignment issues
  #1
New Member
 
Stefanie
Join Date: Oct 2014
Posts: 7
Rep Power: 11
SprayStef is on a distinguished road
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;
}
doesn’t work…

Code:
Bt_ptr -> Bt;
doesn’t work…

Code:
(this->Bt_ptr) -> Bt;
doesn’t work…

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
SprayStef is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 03:15.