Civil Engineering Association

Full Version: Programming with C++ Free discussion
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Looking forward to your submission.

Keep up the great work. I enjoy seeing how engineers leverage programming to solve real world problems. Maybe we could even get a group of engineers to develop a nice peice of open source software over on sourceforge. I have been keen for a project for a while....

Out of curiosity, are you still happy with your choice of C/C++ for this project? Any specific reason for you choosing Win32api over say .net?

Regards elbarto
(10-27-2013, 06:24 AM)elbarto_87 Wrote: [ -> ]Out of curiosity, are you still happy with your choice of C/C++ for this project? Any specific reason for you choosing Win32api over say .net?
Regards elbarto

Sure I am very happy with C / C++ .
I can tell you the C /C++ is the bottom line to understand and develope many softwares
the next step is to learn Assembly which is closed to operating system

But as I see it is very complicated , but once you anderstand how it is going and how to arrange the data in the memory then you push every data one by one to processor
then again you get result , once you try to understand these issues , I think you will never use any other language..
I know many people will like micro soft engineering terms and using object and create object and so and so .. but finally create object means you hold a space in memory .. and to reach to this meomry you need to know the address of this memory to know the address of this memory you need to use pointer , which will tell you the location of this data..
See it is very simple .. but just you need to understand firstly the base line..

But note that I am not proffessional , just I try to learn , and I found this is the best way to build my software .. Many other friends will have other viewpoints and totally I agree with them..

Thanks Alberto.
Thanks mecheil.edwar,

I think you will be a much better programmer for having built your application closer to the machine just as you have done. I am the first to admit that my programming experience is quite high level and I don't think I could learn all the tricks with allocating and releasing memory, managing pointers etc. without have spent A LOT of time in the books. Next time I need some help with writing a wrapper for C/C++ code I know who to speak to :).

C# + WPF looks like an interesting subject area to explore when I next get a few days of spare time. I am at the point in my programming learning where I can develop whatever I need to, but I develop something that is 'messy' and hard to maintain. I want to start learning more about design patterns and how to implement them correctly. Learn how to implement abstraction etc. so the final product is much more scalable instead of just solving a very specific problem at the time I first write it.

Regards elbarto
Firstly , I would like to apologize because after long time I did not update this thread.

Let me my friends inform my learning curve...

after learning win api , how to create graphical user interface from pure window programming , I discovered one important issue , when you build any application by c++ , I found that most books explain only a static data , I mean as example , when you write any code , you define the memory size before you compile your program , but actually you need a dynamic data for real program , as example you can dfine matrix a(10) very simple , before you compile your program , simply you tell compiler please cut 10 locations from memory , the address for these items will be 1011 , 1012 ,... as example . this is a static and I do not know dynamics is more difficult for static for any situation ,
I asked my self what if I do not know the size of matrix a(?) , the size of matrix will be define during operation of program ,after compiling....

this is the core of programming , how to manage the memory during operation or during run time of your application .. this is long story for c++ , but it is very nice ,
the secret is only inside pointer , you need to define the first adrress of variable a(0) , and during run time when you create next varaible a(1) , you need to make a linke between first address and second one , so when you establish the link between these adrresses it means you create a run-time variable succssefully . so here you can see how c++ provide you a chance to understand what is going on from scratch .

but to be honest , to do a dynamic classes and variables are so much headeach to do it from zero .. but it is very useful to understand the concept from c++.

so currently I start learning C++ MFC.
the major issue that lead me to learn MFC , is the support that you can get for dynamic class and dynamic variable ...
Oops , I can hear now some friends are saying , oh Mecheil why all of these troubles for C++ , at the begining we recommend c# ,
But honestly I can say I am very happy for learning c++ and win api , because c++ gave me a chance to understand the concept of memory .

finally the core points are :
1- pointers
to manage any data the core point how to make a relation between the memory adrresses , this is central point

2- dynamic variable ( class , variable , matrix , structure)
the second point is mainly depends also on pointers...

you can see how the programming code is very complex , but if you follow the code by using pointers , you will understand a lot of secrets and in simple word , how to manage the huge data by organizing this data by pointers...

I Hope this new post is helpful , and I hope in the new future I Can release my first software..

Regards
Mecheil - thank you for the update.

Out of curiosity, could the above be achieved in pure c rather than c++?

Looking forward to your first software release. I am sure there will be a number of users here that would happily test it for you.

Regards elbarto
@mecheil.edwar
Congratulations for your studies
Just curious. What kind of software is this going to be?
Regards
Dear mecheil.edwar,

I'm happy to see an update of your progress and that you're still enjoying it and so didn't give up.
I've recently discovered a new trend in engineering software industry, WPF and .NET.
It looks like you're swimming against the current Happy.
For me seeing Sap, Etabs, Tekla using WPF in their latest products it's a sad surprise, WPF looks crap and it's slow. Well at least .Net is easy/very easy to decompile and so ..., have a look inside, fix some annoying bugs if developers ignore those Happy.
You're moving towards the fastest and most difficult solution while the "industry" is heading for the easiest and slow/slowest solutionHappy, it's funny.

Sadly WPF is implemented just like win forms, the same windows, buttons with new colors, fancier. Tekla still lacks a decent windows management like docking floating panels, tabbed view/viewports. And waiting for about 1 minute (while it's "jitted") for the frame section definition window in Etabs 2013 is really annoying.
WPF + docking windows looks nice and is useful in Visual Studio 2012 Gui.
And according to glitches, on latest, expensive, hardware, I believe Office 2013 Excel, uses it too.

I've relearned OpenGL, until a few months ago I knew only the classic version, like display lists, immediate mode but no shader and buffers vbo. I've learned GLSL, OpenGL 2.1, and up to modern 3.3.
I'm simply amazed how I can send some data to the gpu, write, compile, link, build, run, my "just in time" c syntax shader code stored in a string and in milliseconds retrieve the results. It's easier than compiling, running, attaching C# scripts.
I wish I had the time for GPU solvers:
Fast and Accurate Finite-Element Multigrid Solvers for PDE Simulations on GPU Clusters, Dominik Göddeke, has code samples.
Code:
***************************************
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:

http://forum.civilea.com/thread-27464.html
***************************************

I actually found a decent comparison, speed of c# vs c++.
Code:
***************************************
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:

http://forum.civilea.com/thread-27464.html
***************************************
And some nice words about garbage collector, reference counting, in c++.
Code:
***************************************
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:

http://forum.civilea.com/thread-27464.html
***************************************

I've talked to some friends they work for an outsourcing company they do testing/debugging of applications made by some other companies. An army of programmers, a lot of money, and what for, buggy slow software, I wonder.

This year, win 8.1, I dealt with:
- a pointless ON/OFF software made by Gigabyte which installed a memory leaking applecharger.sys driver (I don't own apple products). In 3 hours 27GB of free ram were all filled by that crap. When a driver has memory leaks you can't see which one in process view, just with RamMap a large amount in Nonpaged Pool. Driver Verifier might help. google for: windows 8.1 memory leaks, you'll find drivers, antivirus, pointless software, almost anything leaksHappy.
- Autocad 2014 LT flickering when multiple drawings were open, and not saved by autodesk software. Fixed using a registry trick, not by service pack.
Code:
***************************************
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:

http://forum.civilea.com/thread-27464.html
***************************************
- Autodesk 360 was crashing windows explorer, windows was restarting it, and so the desktop background was changing. All file copy/cut windows closed, not restartedWink. I've searched for weeks why explorer crashes when background changes Happy. Uninstalled 360, now properties window/tab in autocad shows only two items Happy. Reinstalled 360 & removed it from startup, all properties show.
- from time to time computer freezes wonder whyLaughLaugh. So thank you software developers and license dealers.

Best wishes
Forgot to mention one of the best Tekla extensions
Code:
***************************************
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:

http://forum.civilea.com/thread-27464.html
***************************************
(06-10-2014, 01:19 PM)ykhackhack Wrote: [ -> ]@mecheil.edwar
Congratulations for your studies
Just curious. What kind of software is this going to be?
Regards
Design of concrete items
Many Thanks LiviuM for your Post regarding to WPF.

I learnt WPF to and I read many good Books .. It is very easy & Very Fast..
Microsoft Built in DirectX in WPF and you can use many graphic tools in many easy ways..

But I do not know how long deep you can go with WPF to Build a Graphic software..
I built only simple windows to see Steel Sections , Making Zoom & Pan ...
It is very nice and very Light..
Sometimes to write code between WPF & C# little bit you be confused ..But it needs training..

to Build 3D graphic user interface with WPF I think this out of scope of WPF..

Waiting for more opinions and discussions about WPF...

Best Regards
Pages: 1 2 3 4