CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

Should I learn C or C++?

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

LinkBack Thread Tools Search this Thread Display Modes
Old   April 16, 2004, 07:15
Default Should I learn C or C++?
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, 09:16
Default Re: Should I learn C or C++?
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, 18:09
Default Re: Should I learn C or C++?
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.


  Reply With Quote


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
A book for a beginner wanting to learn programming frank Main CFD Forum 9 May 12, 2014 23:15
How to learn cfx ? James CFX 10 August 25, 2010 11:18
How can I learn advanced parts of OpenFOAM? mmahdinia OpenFOAM 2 August 27, 2009 08:35
I wanna learn CFD...but... anyaa Main CFD Forum 12 August 22, 2009 00:04
I want to learn UDF usage in Fluent sangamnath FLUENT 5 December 17, 2005 12:16

All times are GMT -4. The time now is 14:45.