Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 C++


  Why would I learn C++11, having known C and C++?

I am a programmer in C and C++, although I don't stick to either language and write a mixture of the two. Sometimes having code in classes, possibly with operator overloading, or templates and the oh so great STL is obviously a better way. Sometimes use of a simple C function pointer is much much more readable and clear. So I find beauty and practicality in both languages. I don't want to get into the discussion of "If you mix them and compile with a C++ compiler, it's not a mix anymore, it's all C++" I think we all understand what I mean by mixing them. Also, I don't want to talk abou...

3,691 0       NEW FEATURE STUDY C++11


  Set Theory in C++11

Have you ever felt the need to perform set theoretic operations on types? Not really? Me neither, but I thought it’s a fun thing to try out. So, if you ever feel the need of using type sets, C++11 makes it quite easy to do so. Especially variadic templates allow for a much more condensed syntax compared to type list constructs formerly used. (Disclaimer: This is rather a proof of concept, but maybe somebody comes up with a useful scenario.)Let’s start by defining an empty type_set type:template<typename ... Types>struct type_set; typedef type_set<>...

2,740 0       C++ SET THEORY MATH


  Custom C++ exception class creation

In standard C++, we can use try catch to catch and exception when something goes wrong. These are some built in exception support in C++. By including the #include , we can now catch exceptions in C++ programs. This actually helps us on debugging our code and reduce the maintenance work.However sometimes if we want to create our own custom exception class. What should we do?We should include the #include line and then extend the exception class and implement some methods as you like. The general format is :#include using namespace std;class MyException:public exception{public:  &nbs...

31,485 2       C++ IMPLEMENTATION STD EXCEPTION CUSTOM EXCEPTION


  QScrollArea Scrollbar Display Solution

Qt framework is a popular C++GUI framework developed by Nokia. And it is also cross platform compatible. Manydevelopers are using Qt to develop C++ GUI programs. In Qt, some importantcomponents are deserved our close attention. Many developers faced the problemwhen they put some widgets in a QScrollArea widget and they want it to displayscroll bars when the widgets inside the QScrollArea overflows. After manyexperiments, I propose a way which can show scroll bars as you expected. The relationship betweenwidgets and layout is the key here. Generally, we need not to add layout toscroll area dire...

16,594 3       C++ SOLUTION GUI QT QSCROLLBAR SCROLLBAR NOT DISPLAY


  Getting started with WTL on Visual Studio 2010

Now that you have downloaded the latest WTL release (v8.1 at the time of this writing), you will find out that it doesn’t have any project wizards for Visual Studio 2010. That’s a relatively easily fix. Just go ahead and download the latest build from the repository at AppWiz.tar.gz-view=tar. Extract the .tar file and you will find the JavaScript install scripts for VS 2010:I recommend you to extract the files to the same location were you installed the WTL files. In my case this would be c:\WTL.  Double click the setup100.js file (or setp100x.js for Visual Studio 2010 Expre...

4,811 0       WINDOWS C++ VS2010 WTL CONFIGURE


  Make a directory using C++ for windows

If you want to create a folder at windows using c++/cpp language, there is an easy way for make a folder. You can do it just including the <windows.h> header file. To make a folder at C:\ drive named "deadman"#include<windows.h>int main(){   CreateDirectory ("C:\\deadman", NULL);   return 0;}If you want to delete a fodler from the C:\ directory.#include<windows.h>int main(){   RemoveDirectory("C:\\deadman");   return 0;}Also you can use the system command from c++ to create or delete a fodler. for examplesystem("mkdi...

16,834 1       WINDOWS C++ EXAMPLE DIRECTORY CREATEDIRECTORY


  10 Questions with Facebook Research Engineer – Andrei Alexandrescu

Today we caught up with Andrei Alexandrescu for a “10 Question” interview. He is a Romanian born research engineer at Facebook living in the US, you can contact him on his website erdani.com or @incomputable.We will talk about some of the juicy stuff that going on at Facebook, so let’s get started.Hello Andrei, welcome on Server-Side Magazine.1. Tell us a little bit about yourself. Who are you? Where and what do you work?Who am I? Ah, the coffee breath of one talking about himself. Well let me try. I’m a hacker living in the US, originally from Romania. In 2001 I wrot...

7,553 1       PHP C++ FACEBOOK FUTURE MACHINE LEARNING


  C++ for the Real-Time Web

C++? Why on Earth?C++ seems like one of the least likely languages to write a web application in.C++ is associated with complexity, both with language design and the need tomanually manage memory. Programming in C++ unleashes a whole class of bugsassociated with memory corruption and memory allocation. This is a trade off forgiving more power to the developer along generally being much faster thanequivalent programs in languages such as Python or Ruby.Real-time Web as a Use CaseMaking a hard real-time application1 onthe web is a futile task. Unpredictable network latencies make this animpossib...

3,996 0       C++ WEB DEVELOPMENT REAL TIME