C++

Convert wstring to string, string to wstring in C++

Use L before wstring wstring wString = L”test”; When you need yo convert wstring to string or char* in C++, just use string wstringChangedToString(wString.begin(), wString.end()); The code shows how to convert and compare wstring to string and string to wstring #include using namespace std; int main(int argc, char **argv) { string stdString = “test”; wstring wString = L”test”; string wstringChangedToString(wString.begin(), wString.end()); if (wstringChangedToString == stdString) { cout

By |June 27th, 2016|C++|Comments Off on Convert wstring to string, string to wstring in C++
  • C++ Unit Testing – Googletest C++ Unit Testing – Googletest

    C++ Unit Testing – Googletest

C++ Unit Testing – Googletest

Lets continue our C++ Unit testing talks. Googletest installation for linux can be found here https://code.google.com/p/tonatiuh/wiki/InstallingGoogleTestForLinux, installing for windows or mac is out of the scope of this post. First download google test source from https://code.google.com/p/googletest/downloads/list The latest version is 1.7.0 for googletest You need python and cmake for installing googletest If you dont have python please install python to your system If you dont have CMake please install CMake on your system Extract googletest source code tar -xzvf gtest-version.tar.gz For build the library please type cd gtest-version mkdir mybuild cd mybuild cmake -G”Unix Makefiles” .. make Now to install builded library […]

By |January 20th, 2015|C++, Programlama Dilleri, Test Driven Development|Comments Off on C++ Unit Testing – Googletest
  • C++ Unit Testing C++ Unit Testing

    C++ Unit Testing

C++ Unit Testing

If you are a really old school C or C++ developer, you know how it is hard to compile, build, link and test your code. Sometimes it takes hours to reach your goal, but in modern approach for C++ development, tools and testing frameworks give you ability to test your code before you write. You have quality code on your hands even when you publish your first release. Test first approach changed our way of programming, actually I met test first approach in 2006 (not for C++ but for Java and C#) and before this I was developing C++ with […]

By |January 19th, 2015|C++, Programlama Dilleri, Test Driven Development|Comments Off on C++ Unit Testing

C++ için IDE

C++ ile kod geliştirmek ayrı bir sanattır. Bellek yönetimini, algoritmaları, desenleri, işlemci ve bellek mimarilerini bilmeniz gerekir. Yazayım yorumlayıcı halletsin yada sanal makina benim için yapsın bellek ayırma, silme işlerini demessiniz. Kullandığınız IDE (Integrated Development Environment) ismi verilen Tümleşik Geliştirme Ortamını iyi seçmeniz gerekiyor. Vim, Netbeans, Eclipse, CodeBlocks, DevC++ gibi yazılımları kullanabilirsiniz C++ IDE’si olarak. C++ ile geliştirme yapmak için Eclipse ve Netbeans tümleşik geliştirme ortamlarını kullanıyorum son senelerde, daha öncesinde CodeBlocks ve Anjuta kullanıyordum. Bilgisayarlarımızda kullandığımız bellek miktarlarının artması ve belleklerin eskiye oranla daha ucuz olması Java ile geliştirilmiş CodeBlocks ve Anjuta’ya oranla kötü performanslı diyebileceğimiz Netbeans ve Eclipse […]

By |December 29th, 2012|C++, Eclipse, IDE, Netbeans, Software, Test Driven Development, Vi, Vim|Comments Off on C++ için IDE

C++ Derleyicisi ve Eclipse CDT IDE Kurulumu

C++ derleyici ve ide kurulumu C++ dili derlenen bir dildir, kaynak kodunu yazdıktan sonra belirli aşamalar (is) ile bu kaynak kodu makine koduna çevirilir. Kaynak kodundan makine koduna çevrim işleminde derleyici isimli bir program kullanılır. Linux üzerinde GCC (Gnu Compiler Collection) isimli yine C ile geliştirilmiş açık kaynak kodlu bir derleyicimiz bulunuyor. Gcc, Microsofd işletim sistemlerinde de kullanılabilir. Gnu Gcc ve Autotools (i) kurmak için Ubuntu ‘da konsolda, sudo apt-get install build-essentials yazmalısınız. Eclipse CDT için Eclipse IDE kurmamız gerekiyor. JRE ve JDK kurulumu sudo apt-get install sun-java6-jre sudo apt-get install sun-java6-jdk Eclipse Kurulumu sudo apt-get install eclipse-pde sudo apt-get […]

By |August 30th, 2011|C++, Eclipse, Linux|Comments Off on C++ Derleyicisi ve Eclipse CDT IDE Kurulumu

C++ ile Yazılım Geliştirme

İnsanlar ile anlaşmamızı sağlayan konuşma dilleri gibi bilgisayarlarla konuşmamızı sağlayan bir takım programlama dilleri de bulunmaktadır. C++ dili, programlama dillerinden biridir ancak bu dili diğer dillerden ayırmak gereklidir. C++ programlama dilinin, nasıl geliştirildiği ve programlama dillerin tarihçesine farklı bir makalede değiniriz ancak kısaca C dilinin söz dizimine sahip olduğunu, “C with Classes / Sınıflara sahip C – Sınıflı C” ismiyle ilk çıkışını gerçekleştirdiği gibi konulardan bahsetmekte fayda var. Dilin geliştirilmesinde aktif görev almaya devam eden Bjarne Stroustrup tarafından geliştirilmiştir. C dilinin struct kullanımının class tanımlayıcısı ile tekrardan düzenlenmesi ile C dilinin sözdizimi ile “Object Oriented Programming / Nesne Yönelimli Programcılık” […]

By |August 30th, 2011|C++|Comments Off on C++ ile Yazılım Geliştirme

Install Mulp on Linux

Mulp is developed with C++ and Wx and libxml++ is used for xml parsing, so we need Wx widgets and libxml++. Wx widgets, http://www.wxwidgets.org Libxml++, http://libxmlplusplus.sourceforge.net After installing Wx widgets and libxml++, download mulp source from http://sourceforge.net/projects/mulp Open the tar ball of mulp tar xzvf mulp-0.0.1.tar.gz then cd to mulp directory cd mulp-0.0.1 ./autogen.sh ./configure make Login with root user and make install if you are using ubuntu or fedora or a distro with sudo sudo make install You installed the mulp software! Now try to run mulp from command line or with Alt+F2 on Kde and Gnome.

By |February 3rd, 2011|C++, Linux, Software|Comments Off on Install Mulp on Linux

Mulp as Ubuntu Control Panel – xml file

Mulp may be used as Ubuntu Control Panel by editing its xml file, the default xml file for Mulp has the applications for Ubuntu. After installing mulp on ubuntu you will see you can use it as the Ubuntu Control Panel. /etc/mulp/mulp.xml file must be changed like this to use mulp as Ubuntu Control Panel Onur GUZEL onur.oguzel@gmail.com 0.0.1 http://mulp.sourceforge.net Truva Control Panel plugins /usr/share/mulp/images/truvalinux.png Online Update Install and Remove Software Boot Startup Applications Software Sources Clean Computer Bluetooth Drivers Disk Utility Keyboard Monitors Mouse Sound Startup Disk Printing Power Management Login Screen Log File Viewer System Monitor Time and […]

By |February 3rd, 2011|C++, Linux, Software|Comments Off on Mulp as Ubuntu Control Panel – xml file

Mulp Editing xml file

Mulp is easy to configure and we will discuss what we can do with mulp by editing its xml. Mulp xml is located under /etc/mulp/mulp.xml Onur GUZEL onur.oguzel@gmail.com 0.0.1 http://mulp.sourceforge.net Truva Control Panel plugins /usr/share/mulp/images/truvalinux.png Online Update Install and Remove Software Boot Startup Applications Software Sources Clean Computer Bluetooth Drivers Disk Utility Keyboard Monitors Mouse Sound Startup Disk Printing Power Management Login Screen Log File Viewer System Monitor Time and Date Users and Groups System Testing Network Setting Network Connections Personal File Sharing Network Proxy Remote Desktop Bluetooth Accessibility Language Support Keyboard Layout Keyboard Shortcuts Theme Compiz Configuration Main Menu […]

By |February 3rd, 2011|C++, Linux, Software|Comments Off on Mulp Editing xml file

Mulp – Multi Purpose Software Panel

I ‘ve developed an open source software, mulp – multi purpose software panel. Mulp was an effort to develop a control center for Truva Linux, but after i finished the software i realized that i always need a software panel when i develop desktop applications. I decided to make it easy-to-configure and usable in every platform where a software panel is needed. Mulp is a multi purpose software panel developed in C++ and Wx. It is easy to configure to build your own control panels. Distribution developers will be able to use mulp in their distributions easily. Project is open […]

By |February 3rd, 2011|C++, Linux, Software|Comments Off on Mulp – Multi Purpose Software Panel