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

 ALL


  C++11 multithreading tutorial

The code for this tutorial is on GitHub: https://github.com/sol-prog/threads.In my previous tutorials I’ve presented some of the newest C++11 additions to the language: regular expressions, raw strings and lambdas.Perhaps one of the biggest change to the language is the addition of multithreading support. Before C++11, it was possible to target multicore computers using OS facilities (pthreads on Unix like systems) or libraries like OpenMP and MPI.This tutorial is meant to get you started with C++11 threads and not to be an exhaustive reference of the standard.Creating and launching a t...

4,118 0       C++ DEMO MULTITHREADING STANDARD 11


  C++/CLR int to System::String^

In C++/CLR (for Microsoft), sometimes we need to convert int to System::String type or vice versa. The simple way is :From System::String^ to int int num= int::Parse(str); // System::String^ to intFrom int to System::String^System::String^ str = num.ToString(); // int to System::String^For all the other data types, similar ways can be adopted....

21,977 2       MICROSOFT C++ CLR SYSTEM::STRING CONVERT INT


  Understanding lvalues and rvalues in C and C++

The terms lvalue and rvalue are not something one runs into often in C/C++ programming, but when one does, it’s usually not immediately clear what they mean. The most common place to run into these terms are in compiler error & warning messages. For example, compiling the following with gcc:int foo() {return 2;}int main(){ foo() = 2; return 0;}You get:test.c: In function 'main':test.c:8:5: error: lvalue required as left operand of assignmentTrue, this code is somewhat perverse and not something you’d write, but the error message mentions lvalue, which is not a term one ...

3,382 0       C++ ELABORATION LVALUE RVALUE LOCATOR VALUE


  C++ Versus Objective-C

What will programming in Objective-C mean to the C++ programmerDifferent Object Oriented LanguagesAlmost all of us have heard the term object oriented programming, and most of us have used C++. How will Apple's purchase of NeXT, and NeXT's framework using Objective-C affect us as we develop software? If we know C++ already, how hard will it be to get up to speed on Objective-C? Many people will agree that once they understand the concepts of object oriented programming it doesn't matter which language they use. To a degree this is true, but development is easier if the programmer adopts a prog...

2,812 0       COMPARISON OOP C++ METHODS OBJECTIVE-C PHILOSOHPY


  Objective-C Is The Language

My good friend Brent Simmons invokes a historical email from Linus Torvalds, about his disdain for C++C++ is a horrible language. It’s made more horrible by the fact that a lot of substandard programmers use it, to the point where it’s much much easier to generate total and utter crap with it.Brent affirms his support while paying homage to plain-old C:But I will admit to an enduring love of C. I still think of C not as C but as the language.I loved C. Emphasis on the past-tense. As object-oriented programming concepts became popular, those of us who were programming in C or simi...

3,548 0       APPLE OOP C C++ OBJECTIVE-C


  mysql – connection example

Mysql is a database, and to gain access to the data within C++ you will need to be able to “talk” to the database via queries (just like on the mysql command line interface e.g. select * from tablename), the connection process is very similar to the command line interface you will need to supply connection details as in hostname (localhost normally), username, password, database to use and also there are other details that you can pass e.g port number more information can be gained from the MYSQL API pagesTo start with I created a struct that will hold the username, host etc detail...

4,722 0       MYSQL C++ CONNECTION DATABASE EXAMPLE


  VIM Plugins for C/C++ developers

Following up on my previous post on Essential Vim Plugins for Web Developers, I have decided to tell you about the awesomeness of the C / C++ plugin for Vim in this article.Now to get things going, let’s start by thinking what are the basic stuffs that you would be carrying out as a C / C++ developer? Include header files, some functions, loops, conditional statements and a main function. These are some repetitive boring tasks that you would rather have someone else do it for you. Well, that’s what c.vim plugin is all about.For example, after installing this plugin, when you...

7,195 0       C PLUGIN C++ DEVELOPER VIM VIM FOR C


  C++ Without Fear: Functions

A function is a group of related statements that accomplish a specific task. Understanding functions is a crucial step to programming in C++, as Brian Overland explains in this chapter from his book.The most fundamental building block in the programming toolkit is the function—often known as procedure or subroutinein other languages. A function is a group of related statements that accomplish a specific task. Once you define a function, you can execute it whenever you need to do so.Understanding functions is a crucial step to programming in C++: Without functions, it woul...

1,945 0       C++ FUNCTION FEATURE ELABORATION FEAR