Programming with C++ Free discussion
Current time: 10-23-2021, 06:40 AM
Users browsing this thread: 2 Guest(s)
Author: mecheil.edwar
Last Post: mecheil.edwar
Replies 39
Views 28706

Programming with C++ Free discussion
I have learnt Visual basic since many years ago ... Also I learnt VBA for Autocad and I did good macros ... also I go through new programming Language C# which is beloved from many authors and you can find hunadred of books today expalin this new language... But till this moment I have one dream to learn C++... to develope my own programs ... I feel C++ is the best ... you build everything from zero .. and you can watch everything runing with your machine by C++ ... I heared one developer said .. with you are only user .. but to be a real programmer you have to use c++ ... It is not easy way .. but I think just the learner will learn it he will open new scope to him to deal with many fields .. it is easy to learn directX and to develop any software needs graphics ... one will say also , you can do applications with .. but unlikely directX and OpenGL is written by C++...

after many searching I found only one source for it is written by Ivor Hortons and published by Wrox is very bad to find only for this great language only one Book( I am speaking for 2005)

in any way .. I hope to learn this langauge and to build one software like Tedds or Masterseries and share it for our civlea forum...

my Best Regards for All..
[-] The following 4 users say Thank You to mecheil.edwar for this post:
  • kostis, sola4466, r3be1, levanduy
Dear mecheil.edwar,

I once had a dream too. I started developing a C# tekla like application. And many parts of it actually work like: 3d snap, OpenGL, extrusion, tessellation, volume boolean operations, section library, undo redo (this was the most difficult part), lots of 3D math..., save, open.

Let's say main differences between C# and C++ are garbage collector, portability, application speed, programming speed.

Programming speed:
- application done in 1 week/month in C++ or 1 day in C#. After 1 year of development in C++ of the above app. I would be still be reading NeHe's tutorials, and trying to create a window.
- very unpredictable/unexpected behavior in C++, very friendly debugging in C#.

Application speed:
- some say C++ is about 10% faster in pure computing like games or structure analysis. IF AND ONLY IF C++ CODE IS OPTIMIZED AS MUCH AS IT CAN BE.
- to get more speed some pros use assembler and C++. I raise my hat to them.
- short/long unpredictable speed in C# because of JIT compilation and garbage collector.

- C# will work on whatever processor and it will hopefully use the "best" instructions
- C++ application will work or won't work it depends on compiler
- C# will work on all windows, maybe even Linux (Mono)

Garbage collector:
- there are some implementations/solutions/models for C++
- in C# you just don't care about memory
End of Comparison

I can say one thing each programming language has it's advantages and disadvantages and most important purpose/range of applicability.
e.g. most FEA software uses Fortran for solver and whatever language for interface.
most BIM (autodesk, tekla, advance) software uses C++ and a huge crew of programmers, debuggers, architects, designers and whatever other IT specialists.

I can say that behind a commercial software there's an army of lawyers, marketing staff, testers, economists, public relations, and few programmers.
I can say that a commercial application requires licensing system, piracy protection, selling system, subscription system, patents and copyrights protection, financing.
I find it almost impossible for a single person to create and "publicly" sell a "general" commercial application.

Now for few customers all above are not required especially for a dedicated application. Instead programming speed and portability are required which can be easily achieved with C# or VB.NET or VB 6.0 or Python or Java or.... whatever language fits the job.

My C# dream is in standby since 3 years ago. All I've learned has been used in small applications that are finished and even work as expected in XP, Vista, 7, x86 and x64.
The feeling when a piece of your own code works it's fantastic but so is the outside world, outside of a thought, a computer screen, a programming language. And a dream doesn't feed the stomach.

I would prefer a C# Parallel.For instead of ..... in c++. Also I would prefer to wait 1 min. out of 10 instead of still writing that C++ app. And I would prefer a stupid friendly language instead of a smart unfriendly language. As being said there's a lot to discover around instead of how pointers actually work Happy.
.Net vs C++ or C#+OpenGL wrappers vs C++ comparison can be found on so many forums to mention.
It must be said that software speed depends on compiler but most important on algorithm. Stupid algorithm will run slow no matter what language you use.

At the end please take all this as an advice from an engineer with programming skills who once dreamed he is a programmer with engineering knowledge.
Good luck in learning C++. In my opinion C++ vs .Net is like Ansys vs SAP2000.
[-] The following 22 users say Thank You to LiviuM for this post:
  • freequo, miquan, 3fan, BennyP, Grunf, malc, triance, BLESSED DOVE, cace-01, mecheil.edwar, junaid, NAUTILUS87, Mohammad6299, melekeen, Dell_Brett, sola4466, warbeast, carolinandra, piscesa, levanduy, karthikeyans3d, mig21
For every option you will decide to use this program maybe will help you.

Content of this section is hidden, You must be registered and activate your account to see this content. See this link to read how you can remove this limitation:

[-] The following 5 users say Thank You to BennyP for this post:
  • mecheil.edwar, LiviuM, Mohammad6299, Dell_Brett, 3fan
(06-20-2012, 01:24 PM)mecheil.edwar Wrote: I have learnt Visual basic since many years ago .... I have one dream to learn C++... to develope my own programs ...
You're wrong! You can develop easily your own programs in Visual Basic.
Believe me, if you can't believe in yourself! Laugh

As Livium I also did (and continue) do make programs, and I completely agree with every single word he said (although I didn't use C++ C# but Fortran and LISP). My advises (just to comply Livium's) are:
  • Use modern compilers (versions) if you are not limited to old computers and OS (i.e. do you need MS-DOS applications, or simple and small footprint Win32 apps to be used on old PCs with not enough RAM etc? If not - go with .Net and the latest versions of Microsoft compilers - they will continue to develop, and you can program many years, just upgrading).
  • Use a development environment that gives you easy debugging and dialog cration, as the more complicated the user interface becomes the more diffcult becomes for a single person to keep track and manage all the small parts of the whole program. That is why I like VB since it appeared (oh, how old I am !)
  • Use a programming language that has many additional libraries, components, etc. that you can include in your own program as ready-made building blocks.
[-] The following 4 users say Thank You to ynopum for this post:
  • mecheil.edwar, LiviuM, 3fan, Mohammad6299
Kindly , I want if any friend has experience with c++ to share his openions with us ..
I know many persons saying C++ is very difficult .. some others saying .. C++ is one of the best programming language between , some others saying you have to select what will acheieve your application ...diifernet viewpoints .. maybe this is good to contribute the development of one of endless sector of life I mean programming..
But I expect the future will be for C# ....which is supported by the great Dragon Microsoft..

Also I want to send my best regards to " LiviuM " for his effective discussions seems to me he is proffesional programmer ..

My Best regards to All..
[-] The following 1 user says Thank You to mecheil.edwar for this post:
  • levanduy
Hi i have developed some codes in both c++ and matlab, from my experience i believe that the selection of a language depends on the application you want to make. Both languages have their positive and negative points.

If you want something more "professional", with very fast codes (depends on your skills and knowledge of programming),with many additional libraries, and many other capabilities you can use C++ (time consuming option at first but everything gets faster when you get used to it)

On the other hand you can use matlab, it is easy to learn, has many capabilities, has a very big open source repository with applications developed by its users, its easy to understand and you don't need to have deep knowledge of programming to make your program work.

There is also a third choice combining matlab with c++ or in general combination of several programming languages :) but this would be the hardest choice

I am waiting to hear what you chose at last! And if you ever start a big project like the one you dream to share with our forum and need help, contact me i would be glad to help, if i can! ;)
[-] The following 7 users say Thank You to kostis for this post:
  • 3fan, mecheil.edwar, LiviuM, Mohammad6299, r3be1, warbeast, levanduy
Since I sent my first post in this subject , I am still learning C++...
Finally I can decide that .. No way to be a real programmer to learn C++,
It is a hard way .. But no other options..

I will Explain my Plan for learning mybe it will be useful..
I start firstly Learning C++ , I understood the most basic concpets about Oop "Object orinted programming " and I understood the core concpet of language..
to Know how c++ is working you have to see pointers .. which will help you what is running inside the memory of your machine...
I think I covered most important points for C++..

then I start to learn DirectX.. this is an effective tool which will help programmer to deal with graphics... But I face one other problem..
DirectX will deal with Windows API programming..
So I found my next step should be WinAPI programming..
I got a good basic knoledge about how Windows operting system is working..
for this subject the programmer will need to read this Book "Programming Windows - Charles Petzold 5th Edition 1998"...
Now after learing the core concept of how windows API is working my next step will be to learn DirecX.. it will be easy to walk with directX after learning WinAPI .. But Learner has to know WinAPI is written by C not by C++..

then my final step will guide me to learn MFC ..Microsfot foundation classes .. which is based on the core concept of WinAPI..

Really it is not easy way .. but it is the rock road .. Just you build you will open for you the effective resources which will help you to produce a proffsional programs...

Someone will say why no .. c# or visual basic .. is very easy and why all of this headeach..
I agree .. no headeach .. but you will not get the core concepts ..I think real programmer has to know C , C++ , WinAPI ..

Still I am learning .. and Just I will produce a simple program I will post her ..

My Best Regards ..
[-] The following 3 users say Thank You to mecheil.edwar for this post:
  • rendel_©, LiviuM, warbeast
After using Microsoft excel for everything for years I migrated to MATLAB to crunch numbers which excel struggled with (matrix analysis etc). When I reached a point where I wanted to build functional GUI's and have a more flexible program i.e. include different modules for other non math related tasks, I went in search of a "real" programming language.

I looked at c++ but I could not justify the need to learn such an in depth language as programming was just a means to increase productivity in my primary role as a structural engineer.

I found Python + wxPython to be the ideal combination for a powerful programming language with a good GUI frame work. For building engineering applications (small scale) I am yet to find something that I could not implement in Python.

While I understand why you feel c++ is more of a "real" programming language because it is lower level and accounts for a lot of the windows operating system I really cant see the benefits for an engineer writing their own programs. You are obviously a better programmer than I am if you are familiar with the win32api and DirectX so your needs might make c++ more appealing but I think it is a bit misleading to advise engineers the only way to write a real program is with c++.

I recently reassessed if I should step "down" to a lower level language such as c++ but my research showed that with the .Net framework language choice is rather arbitrary (pick what you are most comfortable with) as they all use the same libraries. I would be interested to hear what the main advantages you have found c++ offers when developing engineering applications so I can give it some more thought if there are significant advantages to be had.

Just my $0.02 as a structural engineer. All the best with your program, hope it comes together nicely for you.

Regards Elbarto
[-] The following 6 users say Thank You to elbarto_87 for this post:
  • avscorreia, LiviuM, 3fan, freequo, mecheil.edwar, george85
I would like to update my poor experience for programming .. to continue with this difficult
but very impressed road..

After Learning C++ , and Win32API.. to add 3D graphic Presentation to your application
you need to use DirectX...

But Actually after Many trials I faild to learn DirectX...
And Nowadays I know why DirectX is Difficult (from my viewpoint)..

DirectX depends mainly on COM technology ...

So I found that to write simple code by DirectX .. I need to start with COM...
Oops... So I found myself faild to build Engineering Application with 3d Graphic Tools..

But after hard times for learning I discoverd very very very good Tool and also very Easy tool...
It is OpenGL...

OpenGL is very friendly independent tool will Help programmer to use Advanced Graphics Option...
You can Build any Application and Present the results in 3d Graphic Window by Very Simple Codes...

The Good News Also .. you can Build your application either by using Console Application, or by Using Win32API...

So I feel that with short period I will release my very simple Win32API with 3D graphic Application...

I hope to recieve your comments ..

My Best Regards to All
[-] The following 5 users say Thank You to mecheil.edwar for this post:
  • junaid, ykhackhack, LiviuM, Dell_Brett, r3be1
Very interesting topic,

I can see Elbarto already spoke about it, so maybe this reply will be unnecessary.

But I would just like to comment on the usage of Python - fantastic language, clear syntax and easy for reading the code, by any beginner.

As somebody who had some background in Turbo Pascal, and not other programming knowledge, I find Python fantastic for beginners.

There is one thing thought - I think it is the most slowest one among the modern languages.
[-] The following 1 user says Thank You to george85 for this post:
  • mecheil.edwar

Possibly Related Threads…
Thread Author Replies Views Last Post
free discussion about Tekla, Autodesk, Bentley mecheil.edwar 5 4,198 04-05-2015, 05:08 AM
Last Post: Williams

Users browsing this thread: 2 Guest(s)