- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 12
- Posts with Downvotes
- 6
- Downvoting Members
- 9
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 … | |
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 … | |
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> … | |
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 … | |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
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] … | |
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 … | |
Re: Are you a 12th class student making a C++ project for CBSE boards? | |
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] … | |
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? | |
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 … | |
"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. … | |
Re: 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. :) | |
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 … | |
Re: 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! | |
Re: 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 … | |
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 … | |
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 … | |
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. … | |
Hi...kindly tell me if the following compiler accepts vectors. C++ g++ (GCC) 4.1.2 | |
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 … | |
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 … | |
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 … | |
Is codeblocks an ANSI compiler compatible with gcc/g++/gpp (the GNU C/C++ Compilers)? | |
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? |