3,815 Topics

Member Avatar for
Member Avatar for triumphost

Yes I know its a long code and it will get longer but there is a compiler error in the [COLOR="Green"]int main ()[/COLOR] First Visual C++ 2008 Express edition error [QUOTE] ------ Build started: Project: MAC ADDRESS, Configuration: Debug Win32 ------ Compiling... MAC ADDRESS.cpp warning C4603: '_WIN32_WINNT' : macro is …

Member Avatar for triumphost
0
771
Member Avatar for avirag

Hi i have created this thread for general information of Google.....!! Can anyone tell me how does Google works, I want to know the algorithm that works behind that, i mean how the Google search is working. Can anyone give me the idea regarding this............... Every answer is appreciated.........

Member Avatar for Diamonddrake
4
149
Member Avatar for triumphost

I think I have to the code right cuz it all compiles perfectly except when its done running, and I go to my documents, I dont see my directory... [code] #include <iostream> #include <windows.h> #include <winuser.h> #include <stdlib.h> #include <string> #include <stdio.h> #include "stdafx.h" #include <lm.h> #include <assert.h> #include <fstream> …

Member Avatar for triumphost
0
197
Member Avatar for allensmith

I have to manipulate strings so that, we need to check if a string needs to be combined with another string. Need to use a library function for this. Suppose, we have S1. This is an apple s2. apple is sweet so, the combined line should be: This is an …

Member Avatar for c coder
0
90
Member Avatar for wonder_laptop

Hello, Could anybody please help me understand the idea of LCR leader election in a synchronous ring? The idea is: Suppose a distributed system consists of a collection of homogeneous participants • How to pick one out of this group? Basic assumptions • Each participant has a unique identifier • …

0
60
Member Avatar for triumphost

Ok the code below is supposed to edit a file called license.dat and replace texts in it... it works great it does all that but I want to implement user input in it. By this I mean I want the user to be able to enter the drive letter for …

0
80
Member Avatar for tgir

Hello, i am a final year student in engineering and my project require me to write an algorithm to solve a puzzle problem.Actually, my project is on a 3x3 warehouse space where items need to be stored and retrieved.how do i get started with writing the algorithm? i already made …

Member Avatar for tgir
-1
169
Member Avatar for Cheesy74

I'm writing a collision algorithm based on the Separating Axis Theorem that works like so for each side: - Gets the separating axis of the side - Measures the object's width on that axis and places the width on the axis. - Measures/places width for object that is being collision-tested. …

Member Avatar for VernonDozier
0
362
Member Avatar for elio888

Hi, I have found this code that helps me convert the bearing and distance in to latitude and longitude. Lat/lon given radial and distance A point {lat,lon} is a distance d out on the tc radial from point 1 if: [CODE] lat=asin(sin(lat1)*cos(d)+cos(lat1)*sin(d)*cos(tc)) IF (cos(lat)=0) lon=lon1 // endpoint a pole ELSE …

Member Avatar for kvprajapati
0
105
Member Avatar for aomran

I have a new assignment about Huffman encoding, there is part of the assignment that is not clear to me, I searched the web, but could not find an answer, I need some help to understand this part. it is as follows: The standard algorithm states that you should use …

Member Avatar for Lerner
0
70
Member Avatar for NicAx64

hi all, I write this program under the C++ not C. But I heaively used the malloc() and free() functions in my code. In brief what my code does is just allocate memory for NFA transition table. It grows dynamically. When the number of transitions is a %4 then it …

Member Avatar for dkalita
0
173
Member Avatar for Wolf CCMLG

Can someone help me please, I am getting this error: [B]stringdefinition.cpp(7) : error C2448: 'stringClass::wordCount' : function-style initializer appears to be a function definition[/B] When trying to compile this code: [B][U]StringHeader.h[/U][/B] [CODE] #ifndef H_StringHeader #define H_StringHeader #include <iostream> #include <string> #include <cstring> #include <algorithm> using namespace std; const int strLength …

Member Avatar for Wolf CCMLG
0
156
Member Avatar for jingo1126

guys wondering how come the code doesnt work.. im using tasm as u might know..im checking on things work and want to see what its output be..thanks hope you can help me with this one. i tried converting it tasm but say argument needs to be override. [code] .model small …

Member Avatar for NotNull
-1
154
Member Avatar for x3277789

Hi Everyone, So i have been trying to figure this out for ages. Im just not able to to get the algorithm straight. Say I am given a string containing markup tags ex. <html> </html> in a string like this: <html> <head> <title> Example </title> </head> <body> quiet <CAPSLOCK> LOUD …

Member Avatar for ov3rcl0ck
-1
259
Member Avatar for vamsi310

I read an algorithm on collaborative clustering and the author is merging and splitting for the same side of the threshold. Is it right to do so?

Member Avatar for quuba
0
40
Member Avatar for lotrsimp12345

My understand is in generic programming you can have multiple containers, which use iterators but use the same algorithm. Wouldn't template be considered a ADT? Really confused.

Member Avatar for kvprajapati
0
299
Member Avatar for Narue

Does the search algorithm use the current contents of the database, or a snapshot? Because I can do a search for something I know exists in a recent thread, but it doesn't show up in the results.

Member Avatar for Dani
0
202
Member Avatar for gretty

Hello Can you assist me in developing my algorithm? I have to do this: [QUOTE]Write a C++ function balanced that uses a [B]stack[/B] to check that all brackets in a string are balanced. For eg: This is a balance string: [I]This (string) has (balanced {brackets[(now)]} [thanks])[/I] This string is not …

Member Avatar for VernonDozier
0
1K
Member Avatar for AutoPython

Okay, I was thinking about making an encryption algorithm, now the thing with most algorithms is that they follow specific steps. Well, I was thinking, what if you made an algorithm that generated random characters (the kind you see on your keyboard, excluding characters that could crash the program), and …

Member Avatar for ov3rcl0ck
0
574
Member Avatar for imclumsy

Hi I am trying to find out a way to swap two nodes in an unordered linked list. I want to find out a way where i can change the links of the two nodes so they are swapped. I know I am supposed to use the previous and next …

Member Avatar for masijade
0
1K
Member Avatar for haroonjamia

[QUOTE=varunrathi;72258]Can anybody help me with permutation in c++. say if the entered string is "stop" then there must be 24 (=4*3*2*1) different words made by the letters s,t,o,p. Similarly if the entered string is "abcde" then there will be 120 (=5*4*3*2*1) different words made using the letters a,b,c,d,e. Please Help. …

-1
75
Member Avatar for NT.

Hi, I am thinking about something that I heard in a discussion and I am not sure whether it is really like that or not. Calculating a shortest path on a graph can be done either using dijkstra's algorithm , basically DFS or by BFS. There might be some other …

Member Avatar for NT.
0
105
Member Avatar for markrezak

[CODE]ok ok i got it now right i copy it to vector and sort it..... here is the code #include <iostream> #include <fstream> #include <algorithm> #include <string> #include <map> #include <vector> using namespace std; typedef map<string,int> word_count_list; struct val_lessthan : binary_function < pair<string,int>, pair<string,int>, bool > { bool operator() (const …

Member Avatar for markrezak
0
273
Member Avatar for markrezak

ok ok i got it now right i copy it to vector and sort it..... here is the code #include <iostream> #include <fstream> #include <algorithm> #include <string> #include <map> #include <vector> using namespace std; typedef map<string,int> word_count_list; struct val_lessthan : binary_function < pair<string,int>, pair<string,int>, bool > { bool operator() (const …

Member Avatar for William Hemsworth
0
178
Member Avatar for markrezak

.the program is running .display the frequency of words and sort them from highest count to lowest. my problem is about the duplication of the counts or value of the words.if the value of the word are same it only display the first word&value ...can some one help here is …

Member Avatar for markrezak
0
188
Member Avatar for rakeysh verma

I want the following. Write a program that implements the FIFO and LRU page-replacement algorithms ( Virtual Memory) 1) Read the size of reference string from keyboard 2) Generate a random page-reference string where page numbers range from 0 to 9 3) Create a input file with generated reference string …

Member Avatar for ajay.krish123
-1
250
Member Avatar for karthik.u

Hey guys need some help with this. I m kinda new to c++. I m trying to insert a structure into a set. and when i compile this i m a gettin an error. i guess i need to add a comparator function please let me how do i do …

Member Avatar for Tom Gunn
0
2K
Member Avatar for deeptharamesh

hi pple.... i am doin a mini proj and can anyone please help me the java code of the ad-hoc on distance vector routing algorithm.....

0
55
Member Avatar for codedhands

Hello Good people,am not so sure if this should go here,i am student who is interested in developing a search engine that indexes pages from my country.I have been doing my research on Algorithm to use for sometime now and i have found HITS and PageRank as the best out …

Member Avatar for almostbob
0
202
Member Avatar for hellonikki

Hi, i have created a program in c++ that implements dijkstra's algorithm, and i would like to count how many operations the program makes, but i dont know how. Here is my main code: int main() { int counter =0; dij d; d.read(); d.algorithm(); d.output(); return 0; } can anyone …

Member Avatar for StuXYZ
0
91
Member Avatar for leverin4

I'm running into an issue with a program. I need a method that takes a string and returns every possible combination of upper and lower case letters for that string. For instance, cat would return: cat caT cAt cAT Cat CaT CAt CAT The string entered could be any length …

Member Avatar for nomemory
0
795
Member Avatar for Benderbrau

Hello, I'm posting this code so that maybe it will help someone else in the future. I spent about a week trying to figure this out, and Google searches were not helping. Hopefully anyone else wondering about this will see this post on a Google result. The program I finished …

Member Avatar for Gribouillis
0
161
Member Avatar for elghoul

please i want the source code of CPU scheduling algorithm ( FCFS, SJF, priority ) in C language send at [email]samighoul@yahoo.com[/email] thank yooooooooooooou very much :sad:

Member Avatar for peter_budo
1
251
Member Avatar for complexcodes

Hey guys, I have written a recursive function mazeTraverse which finds the path of the mouse to find its food which is placed inside the maze. I am given a maze of of 15 rows and 25 columns. Mouse's starting position is (8,1)[eighth row and 1st column] and the food …

Member Avatar for sfuo
0
109
Member Avatar for alumbagreenz

Hi good day. i am designing a little project for school. This project is to register the MAC address of the laptops of every student in the school. My problem is, when i put in the student's MAC address in the textbox, i would like the little search algorithm i …

Member Avatar for kylegetson
0
108
Member Avatar for johndoe444

The following is the randomized Binary search tree insertion algorithm mentioned in sedgewick's book. "This function makes a randomized decision whether to use the root insertion method of Program 12.13 or the standard insertion method of Program 12.8. In a random BST, each of the nodes is at the root …

Member Avatar for johndoe444
0
142
Member Avatar for Cheesy74

I'm in the process of writing a 2D physics engine in Java, and am trying to figure out the algorithm for the most basic of all physics tasks: Object collision. Detecting collision between two circles is easy: check if the distance between their centers is less than or equal to …

Member Avatar for Cheesy74
0
119
Member Avatar for hao001

[ICODE] #include <iostream> #include <algorithm> #include <string> using namespace std; struct employees { int em_id; string em_name; string position; string gender; }; void read(employees record[], int max_1); bool IDsort(const employees &a, const employees &b) { return(a.em_id < b.em_id); } char Namesort(const employees&a, const employees &b) { return(a.em_name < b.em_name); } …

Member Avatar for VernonDozier
0
152
Member Avatar for serkan sendur

guys i need an error-free way of keeping name value pairs in a regular c# string. i am quite busy, i dont think i am able to come up with the best algorithm now. what i want is two methods one to add a name-value pair to the string, the …

Member Avatar for kvprajapati
1
1K
Member Avatar for dima shawahneh

hiii Im searching for a method or an algorithm that can help me in finding number of holes in an image this image is basically for a letter like "D" "B" --->number of holes can distinguish between those letters.. this will help me alot in my project if it works …

Member Avatar for Ramy Mahrous
0
262
Member Avatar for wewehalim

Hi, i need help in building a program about automata cellular. So, there is 4 state of cells, `0 = space, 1 = ".", 2 = "+", 3 = "#"` This state is continuous from 0 - 3, after 3, it will be back to 0. we need to compare …

Member Avatar for wewehalim
0
532
Member Avatar for wael12211

(Credit card number validation) Credit card numbers follow certain patterns. A credit card number must have between 14 and 16 digits. It must start with: • 4 for Visa cards • 5 for Master cards • 37 for American Express cards. • 6 for Discover cards In 1954,Hans Luhn of …

Member Avatar for sknake
0
377
Member Avatar for xfreebornx

[CODE]#include <iostream> #include<vector> #include<ctime> #include<algorithm> using namespace std; struct student { int id; char name; char nationality; char gender; student() : id(0) , gender(' ') { } student(int i, char g) :id(i), name(g) { } }; void insert(student array[]); bool sortByID(const student& a, const student& b) { return ( a.id …

Member Avatar for hao001
0
320
Member Avatar for shuffman

I'm working on this problem that has n positive integers in a row except for the first column, which always contains zero, these numbers represent the cost to enter each column. I'm supposed to get to the end of the board with the path that costs the least. I can …

Member Avatar for shuffman
0
82
Member Avatar for ameneh_p

hi i want to get it's implementation as soon as possible. i will be thankful for your help. :icon_redface:

Member Avatar for mrnutty
0
158
Member Avatar for jegathis

Hi thr, I'm Jega, doing a project on data preprocessing using discretization(data mining methods). There is an algorithm called EFB(Equal Frequency Binning) using C++ as coding. Do any1 here familiar with machine learning. I got the algorithm, but coding part, i just too weak in tht.

Member Avatar for jegathis
0
141
Member Avatar for anthony1990

[QUOTE=tatumkay;313662]just started c++ class.... we use the absolute c++ book after starting to read this book i decided to buy c++ for dummies and borrowed a book titled object oriented programming with c++ (book is from india written in english) i still have no idea where to start on these …

Member Avatar for Sky Diploma
-1
159
Member Avatar for nateuni

I have been bashing away at this for hours and am not making any new ground. I have to find the employee that is closest to the all the average. Originally I thought I would just see how far each value was away from the average (eg ageRemainder = averageAge …

Member Avatar for nateuni
0
86
Member Avatar for myle

The meaning of parallel is not that of parallel processing. I simply mean that if algorithms A and B are represented by the two sequence of operations (a_1, a_2, ...) and (b_1, b_2, ...), then the executed sequence of operations is (a_1, b_1, a_2, b_2, ...). It is not compulsory …

Member Avatar for myle
0
181
Member Avatar for ClimaxBeetle

This is actually a quiz in our Algorithm Analysis and Design class where we're provided a 9x9 sudoku table filled with few numbers. Now, our teacher allowed us to use any programming language, provided that it's [b]structural[/b] and not OOP, in order to come up with a sudoku solver app. …

Member Avatar for JugglerDrummer
-1
81

The End.