|
[Sponsors] |
difference between const dictionary and const dictionary& |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 8, 2018, 11:26 |
difference between const dictionary and const dictionary&
|
#1 |
Member
Mankaran Dhiman
Join Date: Jun 2017
Posts: 34
Rep Power: 9 |
Hey ppl
Can anyone tell me whats the difference between const dictionary and const dictionary& |
|
January 8, 2018, 12:09 |
|
#2 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
First case you pass a copy of the dictionary, second case you pass a reference.
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
January 8, 2018, 13:20 |
|
#3 |
Member
Mankaran Dhiman
Join Date: Jun 2017
Posts: 34
Rep Power: 9 |
Thanks. Is there any difference between writing
const dictionary& dict and. const dictionary &dict ? |
|
January 22, 2018, 19:07 |
|
#4 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
No there is no differences. You also can write
Code:
const dicstionary & dict = ...
__________________
Keep foaming, Tobias Holzmann |
|
February 2, 2018, 05:32 |
|
#5 |
Member
Mankaran Dhiman
Join Date: Jun 2017
Posts: 34
Rep Power: 9 |
Thanks Tobi
|
|
Tags |
dictionary, openfoam, programming |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding Temperature variations to Density in interFoam | spitchers | OpenFOAM Running, Solving & CFD | 7 | June 15, 2017 11:55 |
undefined reference to a C++'s class member function | linyanx | OpenFOAM Programming & Development | 5 | May 12, 2017 13:44 |
[blockMesh] error message with modeling a cube with a hold at the center | hsingtzu | OpenFOAM Meshing & Mesh Conversion | 2 | March 14, 2012 10:56 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 07:51 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 15:00 |