C and C++ Programming Blog
RSS Feed

Top Programming tips for C and C++ Programmers

Saturday, 15 March 2008 07:38

Today I will discuss top coding tips which can be applied to any particular programming language. Also the tips will help you to write self documented programs which are easy to maintain and understand by anyone. 

Design first then code

Days are gone when we use to take pen and paper and write the pseudo code first draw the flow diagrams of the program. And at the end write the code on computer. Days are changed but still we need to apply SDLC (Software Development Life Cycle) on every program we create. This makes the program bug/error free as well as maintenance easy. I suggest you read Martin Fowler's excellent article Is Design Dead? which explains it in more details. More...

Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Learning Computer Programming - What would you know?

Thursday, 14 February 2008 07:25

While looking around the internet I come across a video tutorial titling "What every would be programmer should know before learning their first language" by Clive Scott. Basically this video is about the numbering system used in computers. But the author gives quite a good explanation of how the numbering system works and why binary number system is used in computers. Then the conversion of numbering system (binary to decimal and decimal to binary) also hex conversion is discussed.

The overall video is a perfect video for a new starter of programming. There is nothing specific to any programming language but it’s a general overview of computer programming and the background theory of what happens when a program is written and the compiled, linked and executed. Like the author says: More...

Currently rated 4.5 by 2 people

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

TrueCrypt Free Open Source Encryption Software

Sunday, 10 February 2008 07:23

TrueEncrypt is a free open Source Encryption Software written in C++ programming language. If you haven't used TrueCrypt before but need to protect confidential information and documents then I can totally propose to use this Free Software. The latest version has the ability to encrypt the whole drive on windows operating system. So without the password (which you set to encrypt the drive), you can not run your windows operating system.

This free open source software is available for windows including (XP and Vista). It is also available for Linux and Mac OS X. Currently the software uses three types of encryption techniques. They are Whirlpool, SHA-512, RIPEMD-160.

One of the features of the software is to encrypt/decrypt the files on the fly. It means that the software can encrypt or decrypt the files in real time. An example could be a video file or a program setup file. When user double clicks on the files to run it, it is decrypted at real time and the program is run from the RAM. I have never seen any software before. I would suggest you to read through the Documentation section before you download the free program.

Here are the links you would be interested in.

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Microsoft Visual C++ 2008 Express Edition

Friday, 8 February 2008 07:19

Microsoft Visual C++ provides a dominant and flexible development environment for creating Microsoft Windows based applications. Microsoft has released the new version of Visual C++ 8. It is aimed at designing and developing Win32 and Win64 applications. It has a support for Game Creator which you can use to develop 2D and 3D games very easily. Microsoft has updated MFC with the new tools and libraries. Using this update to MFC, developers will be able to create applications with the “look and feel” of Microsoft’s Office, Internet Explorer and Visual Studio.

It also supports TR1, is the first major addition to the standard C++ library. The implementation includes a number of important features in VC++ language such as smart pointers, regular expression parsing, new containers (tuple, array, unordered set, etc.), sophisticated random number generators, polymorphic function wrappers, type traits and more.

If you are interested in Visual C++ 2008 Express Edition then you can easily download it and install the beta version. You have two options to download and install Visual C++ IDE. Either web install which will automatically download the VC++ Express which will automatically download and install the software. Or another option is to download an ISO image file with is the complete installation package.

You can read the Performance Improvements in Visual C++ and also read the MFC update where you can also comment on new Visual C++ 8. You can learn C++ programming as a .NET developer. These two tutorials will help you in starting C++ as a .NET Developer. Part 1 - Part 2

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Windows Sockets 2 Programming

Tuesday, 25 December 2007 00:41

Today we will discuss some important sockets functions which are almost used in any windows application which uses the sockets. These references are from the WinSock Version 2. So be sure to try them using the Version 2 or later.

Windows Sockets Reference - WinSock2

Function accept

Description: The accept function accepts an incoming request for connection attempt on a socket.

SOCKET accept(  
SOCKET s,  
struct sockaddr* addr,  
int* addrlen
);

Parameters:

s: This identifies a socket that is in a listening state with the listen function. The connection is actually made with the socket that is returned by accept. addr: Optional pointer to a buffer that receives the address of the connecting entity, as known to the communications layer. The exact format of the addr parameter is determined by the address family that was established when the socket from the SOCKADDR structure was created. addrlen: Its an parameter of type pointer to an integer that contains the length of addr.

If everything goes well then it returns the Socket, and if there is an error then INVALID_SOCKET value is returned. To get the specific error code you can call WSAGetLastError function to get the last error occured in sockets operation. More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
 
Copyright © by MYCPLUS. All rights reserved. #