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

Dont understand the syntax in the codes.

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 11, 2020, 04:57
Default Dont understand the syntax in the codes.
  #1
Member
 
Kai
Join Date: May 2010
Location: Shanghai
Posts: 60
Blog Entries: 1
Rep Power: 11
kaifu is on a distinguished road
Hi,

I know how template is used in C++. However, in the following codes, I am not quite understand the line of "public ParcelType::template TrackingData<CloudType>". What is the keyword template is used for here?

Code:
     template<class CloudType>
     class TrackingData
     :
         public ParcelType::template TrackingData<CloudType>
     {
     public:
 
         enum trackPart
//Kai
__________________
Kai
kaifu is offline   Reply With Quote

Old   February 11, 2020, 09:48
Default
  #2
HPE
Senior Member
 
Herpes Free Engineer
Join Date: Sep 2019
Posts: 298
Rep Power: 3
HPE is on a distinguished road
CloudType

The rest is to assure that the message I have entered is not too short, so that I can be allowed to push `Submit Reply` button.
__________________
Kind regards,
HPE

The OpenFOAM community is the biggest contributor to OpenFOAM; not person A or B. Let's report bugs or issue feature requests in GitLab-OpenFOAM.

Please `design` your questions well. Such effort always pays off well for inquirers and `helpmate`s:
How to create a Minimal, Reproducible Example,
How to give enough info to get help.
HPE is offline   Reply With Quote

Old   February 12, 2020, 12:34
Default
  #3
Member
 
Kai
Join Date: May 2010
Location: Shanghai
Posts: 60
Blog Entries: 1
Rep Power: 11
kaifu is on a distinguished road
Hi HPE,

Thank your for your answers. Could you please help me to understand the structure of codes
Code:
public ParcelType::template TrackingData<CloudType>
I cannot find any examples or references elsewhere as template is used here.
__________________
Kai
kaifu 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
what is syntax error : missing ')' before ';' aleisia Fluent UDF and Scheme Programming 8 March 10, 2015 16:42
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 04:23
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) Yogini Fluent UDF and Scheme Programming 7 October 3, 2012 08:24
syntax error on config.h ehooi Fluent UDF and Scheme Programming 3 November 9, 2011 11:05
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


All times are GMT -4. The time now is 09:08.