3,815 Topics
![]() | |
i am soryy my english is very bad but ill try my best to explain.i need help with my c++ assignemnt urgently. i want to create a frame and fit in this histograph(attached) which i made with the help of the container, where the x-axsis is the number from like … | |
Hello, I'm working at a 8 puzzle ([url]http://www.permadi.com/java/puzzle8/[/url]) i want to compare two arrays. after that I want to get a true or a false and then I want to implement a algorithm. my question is: why can I not use 2 different variables and display the interger values of … | |
can anyone write the code for the following algorithm. my mail is <EMAIL SNIPPED> Object list = [1,2,3...n], where n- number of tuples/records m- number of attributes Phase I The steps involved in this phase are detailed below: Step 1: Construct a dissimilarity matrix ādā using the measurement in definition2. … | |
Hello, I am a non-cs student who has not really had any prior experience with C++ besides coding up a few simple programs on my own time. I am trying to implement the A* pathfinding algorithm and I have all of the logic figured out and written down in pseudo-code, … | |
Hey guys, I have created the following code and I can not figure out how to do one thing, add users. I can do it manually, but I need to prompt the user for two new accounts and then add them to the list. Can someone please inform me of … | |
Hey guys, I am working on creating a dynamic queue and I am having some problems. I got my code wrote to set up the actual code but I am unsure how to put my information in and print it. I need to enter the following information in my queue … | |
So im exploring what a binary search is, and I just would like a few opinions on what I belive a binary search is. So the way I see it, a binary search is nothing more then an algorithm that starts at the middle of an ORDERED list(array or otherwise), … | |
Hey guys, I am running the following program and when I do it only shows the Gold Skate Board, can someone please tell me what I am doing wrong with my dynamic stack and why this does not work! It looks just like my other program! [code] #include <iostream> #include … | |
hi all I'm trying to write a procedure/function in pl sql that get the user's password, encrypting it with md5 algorithm and inserting it into the USERS table. any 1 knows how to do so? i know that md5 is not a good algorithm but i dont care cuz its … | |
Hi guys, I need some help for a homework I have due in 8 hours. I was assigned to write a recursive sorting algorithm that works with iterators :mad: After googling, and putting code together I got this. [CODE]#include <algorithm> template<class IT> void quicksort(IT begin,IT end) { \\begin and end … | |
The program below compiles and runs the way i need it to. However, part of the assignment was to load words, MAX_WORDS=100, into the program and then randomly have the program pick the word. Im really struggling with this part. The hint was to use a LoadWord () function but … | |
Ok, new to C++ and my first assignment is to covert C code to C++, I'm getting pretty frustrated and have been looking at the code for the last two days not truly understanding how to do it. The teacher gave us a program in C which I have an … | |
I'm looking for software to give me an algorithmic answer. That is all I want an alogorithmic answer to several numbers say 10 numbers. | |
Hi all, Alright I will try to be as descriptive as possible, so here is the deal. I am attempting to create a Huffman Encoding Tree. The input file is test.txt the characters of the file are read in and as each char is read in it is converted to … | |
Hello, I have an assignment where I have to create a hash table and load 30 part numbers into it- should be a 2-d array...and eventually I have to prompt the user to choose an algorithm and keep track of collisions. But I am starting really small with this and … | |
hello everyone, I wrote some code on binary search in algorithms using c but here is my problem: [CODE] #include "stdafx.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #include <ctype.h> /* TASK: Demo about static, linear data handling. Four basic operations are exercised: 1) find 2) insert … | |
[CODE]void Graph::writeShortestPaths (int first, ostream& outfile) { for (int i = 0; i < n; i++)// each vertex { currentDistances[i] = 999999; predecessors[i] = -1; toBeChecked[i] = true; } currentDistances[first] = 0; writeShortestPathsHeader (outfile, first); int pass = 0; while (moreShortestPathsToFind()) // see below { int minVertex = first; // … | |
[code] #include <iostream> #include <list> #include <numeric> #include <algorithm> using namespace std; int main() { // create linked list of integers list<int> the_list; // input as requested cout << " Enter length of the list " << endl; size_t len; cin >> len; for(size_t i=0; i<len; ++i) { cout << … | |
![]() | I got this code from a book and it doesn't seem to work. I've triple checked for common mistakes and syntax errors but can't find any. Please tell me where I am going wrong. #include <pthread.h> #include <stdio.h> #define NUM_THREADS 5 int main(int argc, char *argv[]){ int i, scope; pthread_t … ![]() |
Hi everyone! I am working my way through some problems from projecteuler.net and came across one that has stalled me. The task is to find the sum of all primes under 2,000,000. I am attempting to use the Sieve of Eratosthenes algorithm for identifying prime numbers. Here is my code … | |
hey all im back as usual kicking my head ageist the door line 41 is giving me a compile error of "cannot declare variable sortItem to be of abstract type" just learning C++ inheritance its a bit different than java. thanks for all the help. Demo.cpp [CODE] /* File Name: … | |
Hi all, This is my second post. I got some awesome help last time I posted. Thanks. So for my intro to programming class we had to write a Tic Tac Toe game played against the computer. The computer A.I will just pick randomly until: 1. it's possible to win … | |
Here is the code I have but it refuses to remove non letters,digits being read from a file line by line then each word in a line still what is wrong with it? [CODE]#include <iostream> #include <fstream> #include <string> #include <sstream> #include <algorithm> #include <cctype> #include <functional> #include "BST.h" using … | |
![]() | I don't know what in the world I'm doing wrong but I'm sick of staring at my screen and debugging over and over again. It's been a while since I've used C++ so I'm a bit rusty. I'm working on a database project that is supposed to implement a hash … |
Hi, I am trying to do an exercise on weka. I open file iris.arrf from data folder of weka and I made a clustering with Cobweb algorithm (cluster mode useing training set and then classes to cluster evaluation). When I use training test I take as output a tree with … | |
Hello, I need a sorted stack/queue. I mean, the element removed from the stack must be the one with great priority. Stack dimension varies a lot (becomes bigger very fast). I need also to search and REMOVE elements in that stack. Does Java give some good implementation for this? What … | |
Hey guys, I have been looking into queue's and stacks this week guys and I decided that I would like to convert my current array into a stack. Does anyone know how to or can give me some assistance with the current code I have?? I really do not even … | |
Excuse me if it is a silly mistake but i am newbie to java and couldn't figure it out. Basically it searches if txtText (text area) contains the txtSearchParam (text field) and returns the number of txtSearchParam in txtText. Algorithm is working. simply i can't access variables defined in main … | |
Hi guys, I'm trying to count the comparisons in the mergesort algorithm so that I can compare it to other sorting algorithms. I've managed to get a count function to work for insertsort but mergesort is being a complete pain! It's probably a very simple problem but I've experimented around … | |
Program Exercise 3. Your teacher at your school requires your help in grading a True/False test. The test answers is stored in a file called Answers.txt. The student responses are stored in a file called Reponses.txt and has the following layout: 999999999 FTFTFTFTFTFTFTFTFTFT The Answers.txt layout is: FFTFTFTFTFTFTFTFTFTFT Write a … | |
Hi guys, I'm trying to count the comparisons in the mergesort algorithm so that I can compare it to other sorting algorithms. I've managed to get a count to work for insertsort but mergesort is being a complete pain! It's probably a very simple problem but I've experimented around with … | |
Hi guys, I'm trying to count and time the comparisons in the mergesort algorithm so that I can compare it to other sorting algorithms. I've managed to get a count and stopwatch function to work for insertsort but mergesort is being a complete pain! It's probably a very simple problem … | |
I've not programmed extensively, and I've got to create a program that's beyond my knowledge. I'm trying to create a program that will help me measure the amount of memory a certain IP routing algorithm will use to store address prefixes. The program must convert each dotted decimal address to … | |
Hello, So my problem is that I am supposed to write code in order to prove whether or not text in a file is topologically sorted correctly. I have the algorithm on how to do this, but the specifications say that I should use an array of lists to keep … ![]() | |
Hello, I wrote a 2D game with some simple Collision Detection. I used the function IntersectRect() but I think it's slow. This is the code right now: int Collision(CHARACTER* object1, CHARACTER* object2) { D3DXVECTOR3 pos1 = object1->GetPosition(); D3DXVECTOR3 pos2 = object2->GetPosition(); RECT a, b, *des; a.left = pos1.x; a.right = … | |
what is the time complexity of a decision tree algorithm? using if then else statement thank u! | |
I have an error: -------------------------------------- [CODE]Server Error in '/' Application. Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. Description: An unhandled exception occurred during … | |
hello, Dijkstra's algorithm is it more like greedy search or more like A* or none. Thanks | |
Hey all I have been writing my own implementation of a BigInt class and I think I have most of it down. I am using a vector<int> container for my number. I'm curious to what you guys think about. This is my first program using 1000+ lines of code. Please … | |
Im having trouble with an assignment that I was given. here is the assignment and the code I have so far. The Telephone Lookup application The task The goal of this assignment is to design and write a program that does a telephone lookup. The program reads a data set … | |
I am currently writing a program called Encoding and Decoding strings with the Enigma Class. This was a class assignment, but it already has been turned in, and I would like help (I am not looking for the work to be done for me) so I may learn from my … | |
Can someone tell me why my code is not writing to a data file! I get no errors and everything looks great! [code] #include "Account.h" #include <iostream> #include <fstream> #include <cstdlib> // for exit function using std::ofstream; int main() { ofstream outdata; const int SIZE = 6; //Account array Account … | |
I have something to share with you guys if you can help me out.. Here is an algorithm to print out a pyramid of numbers: [I][B]define totalRows to be how many rows define columnWidth to be how many characters in each column for currentRow in range 0 up to (but … | |
Hey guys! I have my code wrote and when I run it, the code gets all the way to this point [code] //Delete Account 333411 cout << "Here you will delete the account 333411: \n\n"; AccountVector.erase (AccountVector.begin()+2); //Print the details of the vector for (int i = 0; i < … | |
Okay so I have been trying to get this program to work for a long time. Basically it reads a text file then populates a structure that is designed to point to the four locations around that object: up, down, left and right. I believe I have the program figured … | |
Hey guys I am trying to work on some linked list stuff and I have my code put together but I wanted to post it on here and just check to make sure I am going in the right direction. Here is what I am trying to do: Create a … | |
Hi, I have an application that is going to be loading in about 30,000 files (very very small ones). These will be saved into memory (predicting about ~30MB of memory needed), and right now I just have them loaded in one at a time..I'll find a better algorithm for loading … | |
I am having troubles getting my program to work. It is supposed to take integers from a file and put them into an array. Then it is supposed to sort them by the bubble sort algorithm. [CODE]#include <stdio.h> #include <ctype.h> #include <stdlib.h> #define N 10000 int main(int argc, char *argv[]) … | |
Does anyone know of a good way to sort an stl map? I have something like the following example: [code] #include <iostream> #include <map> #include <algorithm> int main() { map<int, float> map_to_sort; // Populate the map with between 20 - 2000 elements map_to_sort.sort(); } [/code] Obviously I am aware that … | |
I am new to pseudocode and completely computer science idiot ! need help urgently for answers for following questions: 1.) Design an algorithm for finding all the factors of apositive integer. For example, in the case of the integer 12, your algorithm should report the values 1,2,3,4,6, and 12. 2.) … |
The End.