Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+5
Strength to Decrease Rep
-1
26% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
3
Downvotes Received
12
Posts with Downvotes
6
Downvoting Members
9
3 Commented Posts
Member Avatar for Nikhar

Hi everyone, This might be a very stupid question to ask and the answer might be very simple but I was just curious to know this. How to display "\n" on output screen in C++? We all know \n is used to enter a new line. But what if I …

Member Avatar for rubberman
0
2K
Member Avatar for Nikhar

Hi, Suppose there's a weighted undirected graph G(V,E) where each weight is the distance between two vertices. I have to visit all the vertices of the graph such that the total distance travelled is minimum. Is this an instance of Traveling Salesman Problem? Following is the amount of work that …

Member Avatar for Momerath
0
167
Member Avatar for Nikhar

I am writing a c++ code (or any sort of code for that matter) after one complete year. And yet I don't think I could have become so bad that I can't make a Hello World program. Still, here I am with so many errors. Here's the code:- [CODE]#include <iostream> …

Member Avatar for pc75
0
3K
Member Avatar for Nikhar

I am a newbie, in crafty as well as js, so pardon me if I might have made very silly errors in the following program. What is wrong with the following code? The following code is supposed to create 5*5 matrix where each block would be a 60 pixel high …

Member Avatar for Nikhar
0
219
Member Avatar for Nikhar

The following is my code for Edit Distance problem. The problem asks us to find the edit distance between two strings. My code, I think gives the correct output. If I run the code with two strings of 1500 length each, I get the error. But if I run it …

Member Avatar for Nikhar
0
316
Member Avatar for Nikhar

While it is true that the inorder traversal of a binary search tree produces a sorted output, is the converse also true, i.e., if the inorder traversal of a binary tree is sorted, then is it necessarily a binary search tree?

Member Avatar for deceptikon
0
107
Member Avatar for Nikhar

Firstly, I am not sure if this is the best place to ask the query. If no, please move it to the correct subforum. Now, coming to my doubt, an assembler converts assembly language into opcodes, right? Now, to perform the conversion, assembler needs a certain algorithm. Whats the algorithm …

Member Avatar for deceptikon
0
180
Member Avatar for Nikhar

Ok... i ran my quicksort program on my college lab's machine (i dunno its config) and it took 4 seconds on avg to sort 1 million elements. I ran it on my lappy (4 gb RAM, Intel Core i5-2410M Processor (2.3 GHz)) and it took 0.83 seconds to run the …

Member Avatar for deceptikon
0
112
Member Avatar for Nikhar

The following is the problem to which I am attempting a solution (in fact I have found the solution, there's a small doubt in a concept):- [quote] Q4) Given a floating point number, write a program to convert it into its lowest irreducible fractional form. Note that the total number …

Member Avatar for Nikhar
0
234
Member Avatar for Nikhar

Recently.. I noticed that I can't access a few of my fb apps that were location specific. When I dug a little deeper, i found out that my computer was showing an IP Address that was from US. But I live in India. I used the folowing two trackers:- [url]http://www.ipaddresslocation.org/[/url] …

Member Avatar for smferoz
1
799
Member Avatar for Nikhar

Hey...guys while downloading one of the files I got a whopping 100 seeds.... and a sucking 20kbps download speed! I am very new to the world of torrents...in fact only began yesterday. So, I do not have much idea about torrents. I have a few questions. Firstly, the rate at …

Member Avatar for orwell84
0
233
Member Avatar for arkarjun
Member Avatar for Fbody
-8
237
Member Avatar for Nikhar

Hey guys, I have got a C++ competition tomorrow and it is very important for me. Following are few of the questions from past years. Please, please, pleeeasse read them and guide me on how do I solve them so that I get some preparation for tomorrow [url]http://pastebin.com/m226a46ab[/url] [url]http://pastebin.com/m79b943db[/url]. [url]http://pastebin.com/m370be9ea[/url] …

Member Avatar for tux4life
-6
193
Member Avatar for Nikhar

Hi guys, can you please describe the knapsack algorithm in English. I googled this, the first page was wikipedia. The algorithm there is too mathematical which doesn't help me to understand the solution. Can you please describe its algorithm?

Member Avatar for hag++
-2
61
Member Avatar for Nikhar

I have been studying graphs currently and came across a way to implement it. [code] #include<iostream> #include<vector> #include<string> #include<map> #include<functional> #include<cstdlib> using namespace std; struct vertex; struct edge { vertex *dest; double cost; edge(vertex *a=NULL, double b=0) { dest=a; cost=b; } }; struct vertex { string name; vector<edge> adj; vertex(string …

Member Avatar for Nikhar
-1
107
Member Avatar for Nikhar

"Hasn't this guy herad of google?"The first thing that must've come into your mind when you read the title. But guess what, I did google. And this is a different sort of boot disk failure. It's not the Click of Death. So, then, what's it? I'll come to the point. …

Member Avatar for mjdodd
0
180
Member Avatar for King Dede

I prefer code::blocks coz of the ease of use and the fact that well, coding in it looks so beautiful. It's just too nice. :)

Member Avatar for Stefano Mtangoo
0
311
Member Avatar for Nikhar

Hi... I'm trying to study graphs but I cant find a good tutorial on it. I googled it, but couldn't find what I needed. Can you please suggest me a good tutorial on graphs in c++. I am basically looking for how a graph class is implemented in c++, an …

Member Avatar for Nikhar
0
137
Member Avatar for kenoch
Member Avatar for soloice

There are quite a few errors in the program. Firstly, you don't mention the data type when you call a function. So, in your function main:- [CODE]encrypt(string text, string message)[/CODE] is incorrect. It should be [CODE]encrypt(text, message)[/CODE] And more importantly, you haven't declared text and message!

Member Avatar for soloice
0
88
Member Avatar for rohitn

As far as I know delete does not return anything whereas new returns a pointer. For example, when you write--> [CODE]new int;[/CODE] A block of int is allocated in memory and a pointer is returned that points to the beginning of this block in the memory. So, if you want …

Member Avatar for Nikhar
0
98
Member Avatar for Nikhar

I have made a program to the follwoing problem:- [QUOTE] Another chessboard puzzle (this one reputedly solved by GAUSS at the age of four) is to find a sequence of moves by a knight that will visit every square of the board exactly once. Write a backtracking program that will …

Member Avatar for Nikhar
0
170
Member Avatar for Nikhar

Hi guys...I am learning binary trees and its quite interesting. But I am unable to make4 a the delete a node function in it. Whenever I try to delete a node, a fatal error occurs and the program closes. Can you please point the error out for me in the …

Member Avatar for Nikhar
0
123
Member Avatar for Nikhar

Each year IARCS organizes a series of competitive exams based on computing languages. I have great passion for computers and hence it is natural that I was attracted towards it. Anyways, to cut the long story short, I was selected in ZCO 2010 and I have qualified for INOI 2010. …

Member Avatar for Nikhar
0
92
Member Avatar for Nikhar
Member Avatar for Nikhar
0
64
Member Avatar for Nikhar

Hey guys...I have delayed asking this for too long but maybe its high time. My UPS faced some problems and it would automatically close down. So, basically windows was shut down improperly. Now, the problem is that my computer wont run chkdsk and thereare lots of damaged files. I tried …

Member Avatar for Nikhar
0
125
Member Avatar for Nikhar

Note:- I am NOT asking you to write the program for me. I am NOT asking you to do the homework for me either. All I am asking you is if you could suggest an algorithm for me. Present below are two algorithms. Can you please suggest me an algorithm …

Member Avatar for nezachem
0
130
Member Avatar for Nikhar

Hey guys...Can you please help me explain what does returning an istream object mean. I am currently studying Accelerated C++ and at many places a function returns istream object. What does it mean? For example:- [CODE]istream& read(istream& is, Student_info& s) { // read and store the student's name and midterm …

Member Avatar for Nikhar
0
2K
Member Avatar for Nikhar

Is codeblocks an ANSI compiler compatible with gcc/g++/gpp (the GNU C/C++ Compilers)?

Member Avatar for jbennet
0
153
Member Avatar for Nikhar

Hi....it seems my firefox and my opera has gone barmy. Opera would automatically open new tage and in theadress bar, I would see this--> opera:illegal-url-2. Firefox would open a new window with loads of tags in it and c:/directory in each of them. Can anyone help me?

0
55