CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

Should I learn C or C++?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 16, 2004, 08:15
Default Should I learn C or C++?
  #1
Kim
Guest
 
Posts: n/a
Hi, everyone. I am now struggling with UDFs hardly. Although I habe already learned C++, I habe many problems. So, I want to learn repeatedly C or C++ language. Should I learn C or C++? What is better for both cases, to compile UDF and to interpret UDF?
  Reply With Quote

Old   April 16, 2004, 10:16
Default Re: Should I learn C or C++?
  #2
thomas
Guest
 
Posts: n/a
Hi, For me writing UDF is not a question of learning C or C++. Learning C or C++ will allow you to avoid error of syntax but will never teach you how to build a correct UDF. What you need to write correct UDF is to know how to write correct algorithm (which independant from the language used) and also know in advance what fluent macro you need to get the right variable. Certain people might tell you that you need to know the notion of pointer, and thus learn C or C++. Well my advice is if you just need to use C or C++ for Fluent coding, you should spend more time on the notion of domain and thread rather that pointer. So to conclude I am sure the solution of all your problems are in the Fluent documentation which also give you the basic C/C++ syntax you need.

Hope this will give you furtehr ideas. Thomas
  Reply With Quote

Old   April 16, 2004, 19:09
Default Re: Should I learn C or C++?
  #3
ap
Guest
 
Posts: n/a
To learn C++ you need to know C, so C and then, if you want C++.

Also, to write UDF you should have some basis of C, while C++ is usable only in compiled UDF.

A good C guide has been written by J. Purdum, but you can find a lot of documentation on the Internet.

Hi

ap
  Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A book for a beginner wanting to learn programming frank Main CFD Forum 9 May 13, 2014 00:15
How to learn cfx ? James CFX 10 August 25, 2010 12:18
How can I learn advanced parts of OpenFOAM? mmahdinia OpenFOAM 2 August 27, 2009 09:35
I wanna learn CFD...but... anyaa Main CFD Forum 12 August 22, 2009 01:04
I want to learn UDF usage in Fluent sangamnath FLUENT 5 December 17, 2005 13:16


All times are GMT -4. The time now is 17:34.