3,815 Topics
![]() | |
hi guys, this is my first post here. may be my question sound very silly and stupid to you....apology for that. can anyone plz provide me the above algorithm : 1. c++ algorithm for finding the i th smallest element from a binary heap . 2. c++ algorithm to find … | |
How in the hell do you divide by 7 using nothing but-- ~, ^, >>, <<, &, | -- In a set algorithm. I'm stumped. I've tried mapping out different numbers dividing by each other... it didn't work. I would map out a number subtracting from the other to see … | |
does anybody know how to make bubble sort work in progressively smaller sizes and determine if a list is sorted on it's first try? i've got the basic bubble sort algorithm down. i just can't figure out the rest of it (my basic bubble sort code below) [code] def bubbleSort(list1): … | |
hi everyone. i've just started programming techniques and i need help with understanding how to write a module from an algorithm (pseudo code) i have an assignment to do but i haven't learn anything about modular programming, so i'm in a ditch right now. can anyone show or help me … | |
Hi everyone My name is Egrodriquez and I am new to this, the reason I came across this web site is because I am having trouble with some school work. I am studing for my IT associates degree. My question would be if any one has any idea of what … | |
I am making a c++ program and i need a function that does the following: IF u have an n (e.g: 4) digit number (IN THE FORM OF AN ARRAY) , each digit can take the vlaue from 0 to m (e.g: 5) and can exist more than once in … | |
I am trying to implement edit string algorithm given in: [url]http://en.wikipedia.org/wiki/Levenshtein_distance[/url] in C and I am repeatedly getting "segmentation Fault" I dont understand why......:( Here is my code [code] #include<stdio.h> #include<string.h> int minimum(int a,int b,int c) { int min; if(a<b) { if(a<c) min=a; else min=c; } else { if(c<b) min=c; … | |
Hi' everyone .I'm paresh. I'm a B.Tech(Comp.Sc), 2008 pass out from a private engg. college from bhubaneswar,orissa,india. I want to be an expert in [B][I]data structure& algorithm design for real life problems[/I][/B]. I have already got an job offer from a software company named [B][I]MASTEK[/I][/B]. But [B][I]GOOGLE [/I][/B]is my dream … | |
Hey Daniweb, So my employer has asked me to begin looking into Database work. The government has given my university a grant to try and stimulate employers training employees (because they are not doing this, as employees tend to leave jobs after being trained). So my task is to develop … | |
Hi i'm trying to write a decryption code to process encrypted files. I have the error below whenever I try to initialise an cypher object of type Crypt::CBC and supplying 'Blowfish' as decryption algorithm, I get the following [QUOTE]C:\>decrypt.pl Couldn't load Crypt::Blowfish: Can't locate loadable object for module Crypt::Bl owfish … | |
Hello, Would anybody suggest any STL algorithm that works on two ranges applying a predicate. For example I would like to have the difference of two maps values. Thanks in advance | |
been working on this code for 2-3 hours using the basic c++ information. tearing out my hair trying to figure out what is wrong writing hangman programm but trying to use functions to initialize programm and enter and response computer saying little or no error but wont launch can't figure … | |
Hey, hello everyone. I'm glad to be here at this site now, I searched for 'how to calculate the eff of the algorithm' on google and i have found this site. The poster explained very well and can make me clear out of it. I'm interest in programming-algorithm, Linux (both … | |
Our Software Development forum category encompasses topics related to application programming and software design. When posting programming code, encase it in (code), (code=syntax), where 'syntax' is any language found within our Code Snippets section, or (icode), for inline code, bbcode tags. Also, to keep DaniWeb a student-friendly place to learn, … | |
I am creating a new sorting algorithm as a machine problem and i encounter difficulties. The logic of my said the said algorithm is to create an array by inputing the total numbers to be accepted followed by the array variables and sorting it ascending or descending. The array would … | |
a mouse is trapped in a labyrinth.. and he has to find the cheese! the input is W and H (height and width), and a graph like this one: [CODE] ##...# C###.. ...... .####. .....M [/CODE] i'm supposed to calculate the shortest amount of steps he needs to make to … | |
Hello all. I am new to the board and hope to build great relationships with other forum members. I am working on a program for class that is supposed to show the GCD. I used a text editor to make it, but when i put it in Visual express 2008, … | |
Hi, everybody! I am new to this forum. I have a problem with an oriented weighted graph, more precisely, I have to find the shortest path between 2 nodes, but this path should pass through a given intermediary node. For example, I have a graph with 5 nodes, namely A, … | |
Ok. Originally I was trying to write a program that would calculate pi to infinite decimal places. The calculus baesd algorithm I made for this is flawless, except that C++ can only handle 16 digits! So I did some looking around, for libraries and what not, to find something that … | |
Hi, I am trying to learn how to read the binary of a file, such as a jpg. I got something going here but at run time in windows it says there is an error and the file must close. I'm not even sure if I'm going in the right … | |
I want to create a code in vb.net 2008 that will delete data from its database table(Microsoft Access). The columns (attributes) in the database table are CWNo, Name, IC No, Nationality, Company, Join Date and Expiry Date. Then it will insert data from a Microsoft Excel Sheet that contains the … | |
Hi everyone this is my first post on these forums and I hope that someone can clear up a simple question for me...Right now I am reading Ivor Horton's Beginning Visual c++ 2008 and in chapter four he gives an example program for finding prime numbers using pointers and a … | |
Well here is my biggest jam of the day: 1) I am not sure if I am using the test method successfully in this program. I need to test the recursion to make sure it’s working accurately. I am not sure how to test this before it prints because I … | |
Hello, i have some problems implementing the following pseudo-code. Te problem is that in Pascal i can return user defined data structures (in this case: matrix), and i also tried to return it as a parameter with "var" but it gave a stack overflow error. Anyone can help me? pseudo … | |
Hello I have a C++ program which is supposed to encrypt plaintext via keyboard input using AES-CCMP algorithm. The problem is that whatever plaintext I enter, it displays same ciphertext. The code listing is about 1500 lines. How can I post my code so that programmers can help me out? | |
Hi' everyone .I'm a B.Tech(Comp.Sc), 2008 pass out from a private engg. college from bhubaneswar,orissa,india. I want to be an expert in data structure& algorithm design real life problems. I have already got an job offer from a software company named MASTEK. But GOOGLE is my dream company. i need … | |
Hi, i am stuckon this particular assignment. I will appreciate it if you guyz help me out on these problems.............. 1. Write two functions Max( ) and Min( ) where • max() returns the maximum of two integers • min() returns the minimum of two integers • Each function takes … | |
Hi all. I'm trying to write a 8 Queen Problem solving program in C++ as an assignement for an exam. I created a Matrix Board class to represent the chessboard with some functions such as put_Queen or check_Board for invalid positioning. I haven't yet begin to write the solving algorithm, … | |
f Keyword is: Dell Desktop Computers Output Should be: "Dell" "Desktop" "Computers" "Dell Desktop" "Dell Computers" "Desktop Dell" "Desktop Computers" "Computers Dell" "Computers Desktop" "Dell Desktop Computers" "Dell Computers Desktop" "Desktop Dell Computers" "Desktop Computers Dell" "Computers Dell Desktop" "Computers Desktop Dell" | |
[b]This is a long post with no specific questions as such. I'm just looking for any advice from people with real-life experience in the software development arena.[/b] ---------- Intro: I've just taken up a summer job, and I was really enthusiastic about this. It will be 12 weeks of C++, … | |
[quote] 1 4 15 7 8 10 2 11 14 3 6 13 12 9 5 ☺ As you can see there is a ☺ at bottom right corner. Implement the program so that a box like the above one is displayed (lines may not be displayed). Allow the user … | |
Hello All, Please, advice some as quick as posible algorithm to sort file containing about 500 000 integers. Roughly 30% of them have value 1, 20% are 2, 10% 3......0,1% are 1 000 Thanks much, C | |
My problem is that i can not understand what do they mean by "The application of mathematical algorithms analisys for solving the 'perl calculus' problem". the perl calculus problem sounds like this: we have 3 ordinary perls(1,2,3), and 3 magic perls(A,B,C). Each magic perl can transform itself in the following … | |
hi guys, pls can u help me with an algorithm that we compare record in a database one after the other.As in the first record compare to other records in the database,second record also compare compare with other records in the db,.....................untill all the records are compare. i want to … | |
Hello people, I know how simple binary search works, but how can I do a double binary search, we got students each with a name and a code, I need in my binary search to find a student by name AND by code, using ONLY binary search.How could I do … | |
Hello all, I've been writing a multiple choice question version of the game Hangman. I've got it done except for stopping already asked questions from appearing again. I've got the 'asked' question numbers (the questions and answers are read in from a file into various arrays) added to a vector … | |
hello everyone. i need a bit of help in this project of mine which is due in 2 weeks.. here's what needs to be done, but i have no idea about the logic:( if somebody can help me with the pseudocode or algorithm, i could write the code maself.. [B]Write … | |
Can someone go through the following code whic generates shortest path for randomly generated processes. My code is generating a segmentation error when I run it, and I am unable to locate the bug. //This program implements the O(n) algorithm for finding shortest path for randomly generated processing times [code=cplusplus] … | |
//help please to solve this problem for multiple programs //with arrays. //The purpose of this program is to calculate the car charges //in a parking lot. this program is working for 1 car. //My assignment is to make a program that works for multiple cars //at the same time. //to … | |
A form has several tabs on it. The tabs are Item Category Level 1, Item Category Level 2, Item Category Level 3, till Item Category Level 5 . Item Category Level 2 is the subcategory of Item Category Level 1, Item Category Level 3 is the subcategory for Item Category … | |
The following program is giving error as follows. please get me the solution how to debug this error. Error: Debug Assertion Failed! Program: ... File: d:\program files\microsoft visual studio 8\vc\include\vector Line: 1556 Expression: ("this->_Mycont != NULL && this->_Myptr != NULL", 0) [code] #include<iostream> #include<vector> #include<deque> #include<list> #include<algorithm> #include<functional> #include "print.hpp" … | |
Hi all, I am having trouble understanding BST recursive algorithm. Here is the code: [CODE] int maxDepth(struct node* node) { if (node==NULL) { return(0); } else { // compute the depth of each subtree int lDepth = maxDepth(node->left); int rDepth = maxDepth(node->right); // use the larger one if (lDepth > … | |
I wrote the code for Arithmetic, relational and binary operations. Here i have intilaised all inputs. I want to give inputs from keyboard instead of intialisation or direct Push_back from loop. How to do this? Please check the following code and please help me to give inputs from keyboard. [code] … | |
[CODE]#include <iostream> #include <vector> using namespace std; class Pair { public: Pair(int a, int b) {x=a; y=b;}; int get_x() {return x;}; int get_y() {return y;}; private: int x; int y;}; int main() {vector<Pair> set; \\input of the set of points, with 50 points Pair* a1 = new Pair(70, 64); set.push_back(*a1); … | |
Hi, I want to replace the numbers which are less than 5 in a container. So i write a code as follows. But it is not working. Please get me the solution for this. Destination container should be V2 itself. Where we have to specify destination container. [code] replace_if(V2.begin(),V2.end(), //range … | |
is there a way to "resize" a lib. string? is there a way to limit/set its size to a value? umm, and yeh, is there a better algorithm to search for all substrings in a string than this one i've made: [CODE] for( int i = 0; i < s.length(); … | |
I have a vector<classType> vect in order to call sort( vect.begin(), vect.end() ), what needs implemented in the class classType? I have the overloaded operator< and a copy constructor, but the problem i get is that some member variables of classType that are pointers dereferenciate during the call to the … | |
hi to all, i m doing my thesis in database. its related to data mining. i have to implement it. but i dnt knw how to start it. can anyone plz help me. i hav written the algo psedocode. | |
i am getting error in following program. what is "iota". Why it is giving an error in the following program [CODE] #include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { vector<int> V(10); iota(V.begin(), V.end(), 7); copy(V.begin(), V.end(), ostream_iterator<int>(cout, " ")); cout << endl; cin.get(); } [/CODE] | |
I want to run the following code. Its giving error as "Fatal Error" not able to open 'print.hpp' . No such file or directory.. I didn't understand what is #include "print.hpp". what type of file it is. shall we have to write this header file before executing the program. [code] … |
The End.