3,815 Topics

Member Avatar for
Member Avatar for crazzy_devil

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 …

0
160
Member Avatar for pore

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 …

Member Avatar for pore
0
118
Member Avatar for kalyan9029

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. …

Member Avatar for javaAddict
-1
99
Member Avatar for ironstove

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, …

Member Avatar for VernonDozier
0
215
Member Avatar for tarheelfan_08

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 …

Member Avatar for Banfa
0
119
Member Avatar for tarheelfan_08

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 …

Member Avatar for tarheelfan_08
0
183
Member Avatar for LevyDee

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), …

Member Avatar for mrnutty
0
90
Member Avatar for tarheelfan_08

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 …

Member Avatar for mbulow
0
82
Member Avatar for severman

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 …

Member Avatar for debasisdas
0
302
Member Avatar for -DLS-

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 …

Member Avatar for -DLS-
0
191
Member Avatar for Elenaser

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 …

Member Avatar for Elenaser
0
185
Member Avatar for d34dw4rd

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 …

Member Avatar for d34dw4rd
0
286
Member Avatar for AceXavier

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.

0
27
Member Avatar for jaker29902

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 …

Member Avatar for jaker29902
0
137
Member Avatar for LisaJane

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 …

Member Avatar for peter_budo
0
399
Member Avatar for emmas4impact

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 …

Member Avatar for Adak
0
136
Member Avatar for pinsickle

[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; // …

Member Avatar for pinsickle
0
142
Member Avatar for kneel

[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 << …

Member Avatar for kneel
0
171
Member Avatar for OzY360

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 …

Member Avatar for OzY360
-1
206
Member Avatar for nwhitesel

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 …

Member Avatar for nwhitesel
0
233
Member Avatar for theABCasian

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: …

Member Avatar for theABCasian
0
5K
Member Avatar for brettbed

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 …

Member Avatar for brettbed
0
170
Member Avatar for smoothe19

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 …

Member Avatar for mitrmkar
0
5K
Member Avatar for simonsayz27

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 …

Member Avatar for abhimanipal
0
141
Member Avatar for bufospro

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 …

0
56
Member Avatar for msr

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 …

Member Avatar for ~s.o.s~
0
95
Member Avatar for tarheelfan_08

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 …

Member Avatar for tarheelfan_08
0
152
Member Avatar for hsncvs

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 …

Member Avatar for hsncvs
0
3K
Member Avatar for sam8

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 …

Member Avatar for sam8
0
3K
Member Avatar for kayka

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 …

Member Avatar for rinku2142
0
99
Member Avatar for sam8

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 …

Member Avatar for sam8
0
472
Member Avatar for sam8

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 …

Member Avatar for sam8
0
465
Member Avatar for letigre

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 …

Member Avatar for masijade
0
131
Member Avatar for fattymuffin

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 …

Member Avatar for tcstom
0
107
Member Avatar for Pynolathgeen

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 = …

Member Avatar for Pynolathgeen
0
136
Member Avatar for aimee_jc

what is the time complexity of a decision tree algorithm? using if then else statement thank u!

Member Avatar for jwenting
-2
65
Member Avatar for msman88

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 …

Member Avatar for kvprajapati
0
81
Member Avatar for raymyster

hello, Dijkstra's algorithm is it more like greedy search or more like A* or none. Thanks

Member Avatar for 0x69
0
148
Member Avatar for NathanOliver

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 …

Member Avatar for NathanOliver
0
151
Member Avatar for sean12

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 …

Member Avatar for BestJewSinceJC
0
211
Member Avatar for ppotter3

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 …

Member Avatar for ppotter3
0
2K
Member Avatar for tarheelfan_08

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 …

Member Avatar for tarheelfan_08
0
213
Member Avatar for lebron

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 …

Member Avatar for TrustyTony
0
159
Member Avatar for tarheelfan_08

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 < …

Member Avatar for tarheelfan_08
0
117
Member Avatar for sm4ckth3monkey

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 …

Member Avatar for sm4ckth3monkey
0
658
Member Avatar for tarheelfan_08

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 …

Member Avatar for tarheelfan_08
0
2K
Member Avatar for jeeter19

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 …

Member Avatar for Geekitygeek
0
92
Member Avatar for alcx88

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[]) …

Member Avatar for Adak
0
131
Member Avatar for liliafan

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 …

Member Avatar for Narue
1
317
Member Avatar for liujanet

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.) …

Member Avatar for Truthful
0
299

The End.