Quantcast
Channel: MSDN Blogs
Viewing all articles
Browse latest Browse all 5308

The technologies I use on the field – C/C++ Missions

$
0
0

When I have to handle a customer with native applications, the context is completely different from managed .NET missions.

First, a C/C++ compiler of 10 years ago still works. So what ? You can work with older version of Visual Studio or, I have one customer like, with Visual C++ 6.0 because it was a huge success. For my VC6 customer, I can run the software only in the context of the customer office because it relies on the server-side web application that handles 1500 pages of JSP. An more, at 17:00, the system is closed for maintenance system. In this context, you feel like Indiana Jones in the jungle... 🙂

The always-good application to have in this scenario is WinDBG. You can attach to the process and try to find first chance exception. The other option is to use the WinDBG API to write a pseudo debugger. In fact, you provides a process ID and you attach in soft mode. The program is still running but you register to be notified of any exception and you can see the stack walk, generate a mini-dump and other useful stuff.

But, when you deal with thousands lines of code, if you have a trace/log file, it may becomes your best friend. First, in the code, you have to learn the algorythm speed road. Where the source code begins and where it goes with API system calls, thir-party libraries and CRT/STL calls. if fact, it's a memory problem. Can you brain remember all those functions name ? It's the clue to the success. If you have a good memory, it can be your lawyer.

In large applications, you may have a switch for enabling debug mode with trace files. Advice: use it ! When developers build a complex system, there are logs/traces. It occurs 90% of time.

In the C++ world, the standard ISO C++ has evolved on C++11, C++14 and now C++17. It requires new compilers. But it's hard to move from one compiler to another, specially in the Microsoft C++ world. Sometimes, includes/libs are set on solutions, sometimes it is set on projects, sometimes it's a pain. But, Since VS2013/2015/2017, it's stable. I agree, you have to recompile boost libs or any others third party libs. But your new compiler opens the way to C++11 (witch is the biggest enhancements). There are a lot of features that are available in C++11 that can make your code more sexy and readable.


Viewing all articles
Browse latest Browse all 5308

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>