Programming

Producer Consumer Problem in C++

Today I’m going to solve a most common problem which is known as the consumer producer problem. In this context we have a shared buffer which the producers produce and the consumers consume. The consumers and producers are threads which will simultaneously produce and consume. There are some conditions to be met where consumers have …

Producer Consumer Problem in C++ Read More »

How to send Complex Data Structures in a Socket Program

Hi all, Hope you guys are doing well. I was busy with my work last few days. Today I’m going to write a post about sending Complex data structures using a socket program. In this post I assume that you are somewhat familiar with the socket programming basics. In the following example we are creating …

How to send Complex Data Structures in a Socket Program Read More »

fatal error LNK1168: cannot open ‘filename.exe’ for writing

Hi guys how you all doing?.. I have just finished my University work and having a free week before joining the Industry. Recently I was trying to do some projects using Microsoft Visual C++ 2010 Express in Windows 8 Operating System environment. When I tried to build few solutions I came with the Error called …

fatal error LNK1168: cannot open ‘filename.exe’ for writing Read More »

Dijkstra Algorithm (Shortest Path Algorithm ) Java Code

Dijkstra Algorithm is used find the shortest path in a directed graphs. Following is a java implementation of the Dijkstra Algorithm. class Dijkstra { public static void main(String[] args) { int length = 300;//length of the 2-D array int adjMatrix[][] = new int[length][length]; CreateMatrix cm = new CreateMatrix(); cm.createMatrix(length); adjMatrix = cm.readMatrix(adjMatrix); Dijkstra dk = …

Dijkstra Algorithm (Shortest Path Algorithm ) Java Code Read More »