Henry Wong wrote:
First, a big thanks to Prentiss Knowlton for being here to promote the book Murach's C++ 2008.
Raghavan Muthu wrote:Welcome Prentiss Knowlton to the book promotions
I am a great fan of Murach's books nice to see one of the books in this promotion list!
Henry Wong wrote:
Since we have a C++ expert here this week, I am going to take advantage of it...
I only use C++ for about 20% of the time, so bear with me. But while maintaining code, which has been developed by others, I found a coding pattern which seems... weird.
The code pattern looks like this...
At the top of a code block is a variable declaration -- and instantiation. The variable isn't directly used in the block at all -- and about the only communication with the variable is the parameters when calling the constructor.
Basically, the constructor of the variable will allocated resources, and the destructor will clean up after it, when it leaves the block (goes out of scope). It looks quite elegant, but the first time I saw this, it took me quite a while to figure out the purpose.
Is this pattern common?
Rogerio Kioshi wrote:Hi,
Is it necessary to know pointers and how to manage memory allocation to program in C++?
If it is, I prefer programming in Java...
Vyas Sanzgiri wrote:Why would you want to go back to C++ when there are other free and equally powerful languages like Java. I work with machines and manufacturing and still I can take the performance hit of Java and make it work.
Why do people still code in C++ and esp C++ in .NET which is a commercial license? There are so many tools/plugins/IDEs/components available in other languages to get up and started with.
Riaan Nel wrote:Hi Prentiss
In the same vein as Gian's question in another thread on this forum - How does plain old C++ (before .NET) compare to C++.NET? Has the .NET framework had a generally positive effect on C++ in terms of things such as execution speed and ease of use? I played around with C++ a couple of years ago, and I'm interested in taking it up again.
When taking (hobby) game programming as an example, I assume that C++.NET will be better suited to the task, as I'm guessing that it has a bunch of useful graphic libraries. On the other hand, when writing applications in which speed is absolutely crucial, will plain old C++ be better? I'm not intimately familiar with .NET, but since it's a Microsoft framework, I'm guessing that C++.NET is a no-no when applications have to be platform independent?
Edit: Just for interest's sake; does your book give preference to either C++ or C++.NET?