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 Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 11, 2020, 03:57
Default Dont understand the syntax in the codes.
  #1
Member
 
Kai
Join Date: May 2010
Location: Shanghai
Posts: 61
Blog Entries: 1
Rep Power: 15
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, 08:48
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
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.
HPE is offline   Reply With Quote

Old   February 12, 2020, 11:34
Default
  #3
Member
 
Kai
Join Date: May 2010
Location: Shanghai
Posts: 61
Blog Entries: 1
Rep Power: 15
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


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 15:42
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 03:23
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) Yogini Fluent UDF and Scheme Programming 7 October 3, 2012 07:24
syntax error on config.h ehooi Fluent UDF and Scheme Programming 3 November 9, 2011 10:05
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 15:16


All times are GMT -4. The time now is 10:19.