228 Topics

Member Avatar for
Member Avatar for adohertyd

I am writing a spellchecker program and have some issues. First thing is that I need to make better use of the memory. My code iterates through a large dictionary file repeatedly. I know its better to read this into memory first then iterate through the block but I really …

Member Avatar for VernonDozier
0
205
Member Avatar for FiToKa

Hello, everybody! I've been struggling on implementing the Binary Tree data structure with some standard functions in it. After reading information from many sources and some work on my own, I've came up to this: [url]http://pastebin.com/B6Gtjb61[/url] Problems occur in the main funciton. What I can't understand is why does the …

Member Avatar for FiToKa
0
264
Member Avatar for desert564

pls help me with this the user enters a number n.consider the sequence from 1 through n in ascending order.insert either '+' or'-' between each of the digits so that the resultant sum is zero. for eg: input=7 output= 1+2-3+4-5-6+7=0 1+2-3-4+5+6-7=0 1-2+3+4-5+6-7=0 1-2-3-4-5+6+7=0 however when i programmed it i only …

Member Avatar for NormR1
0
184
Member Avatar for aizen92

Hello, I would like to know how can I put a binary number such as 110 in a register in MIPS? Thanks,

0
145
Member Avatar for emitremmit

I am having problems with my program to add and multiply two 4 bit binary numbers. The part in which I am currently having trouble is when I run the program the output for the addition function is not correct. Instead of displaying the correct answer it is just displaying …

Member Avatar for emitremmit
0
264
Member Avatar for Morten Brendefu

There are many places on internet for great help regarding many things. Proper implementation of really fast routines for sorting data however is not common. I am not claiming these routines to be the fastest around, but their ease of implementation and use may make them welcome. As a thank …

0
244
Member Avatar for mwjones

I'm having trouble writing binary data out to a file. My end goal is to add a chunk to a PNG file; which has a format of: length (4 bytes), type (4 bytes), data (lots of bytes), crc32 (4 bytes). Collecting each of these pieces is not a problem, but …

Member Avatar for woooee
0
227
Member Avatar for BITnur

Im doing my project on number conversion. I found the coding below. can anyone help me to explain the coding. why the coding have "count"? why the "count + 1"? what function of "count"? [CODE]void Bin2Dec() { long int a[20],i,n,count=0,b[20],c[20],sum=0; printf("\n Enter a binary number to convert to decimal form:"); …

Member Avatar for BITnur
0
232
Member Avatar for Rubinder singh

[CODE]void inorder(struct node *r) { if(r!=NULL) { inorder(r->left); printf("\t %d",r->data); inorder(r->right); } }[/CODE] in the above code when the last element is reached i.e r->left becomes null then when inorder(r->left) is called it will send a null value to the function and if condition becomes false so the it'll come …

Member Avatar for mikrosfoititis
1
165
Member Avatar for needforkevin

hello all! i am working on a program that reads in a text file that the user inputs, creates a text file that the user inputs, names the text file that the user wants, and then sorts the text file sorting words above the user entered in threshold and displays …

Member Avatar for needforkevin
0
320
Member Avatar for thetechlady21

I am having trouble with this code and realizing that my flags are not work. I am referring to a list box with US states inside. See my code below and tell me what I am doing wrong. I can not output the state with first two letters. A simple …

Member Avatar for WaltP
0
178
Member Avatar for infantheartlyje

Hi folks, I had created a class for student. This is the class. [code] class student { int rollno,marks; char name[20]; public: void show(); void get(); int filecreate(const string &,fstream &); int fileopen(const string &,fstream &); static int add(const student &,fstream &); static int read(const student &,fstream &,int); static int …

Member Avatar for WaltP
0
222
Member Avatar for c++_fem

Hi, Does anyone know a function that prints out binary tree in this form example : ................15 .........12.............17 .......10 14.........16 18 ? my Node class : [CODE] class Node { double Node_Data; Node Left_Child; Node Right_Child; Node Parent; }[/CODE]

Member Avatar for Narue
0
331
Member Avatar for guitarguy889

Hello Daniweb! :) I am brand new to this site, and wish I didn't need the help but I do! So let's give it a go shall we? I have a program I have been working on for about two weeks now, and I feel like it should not be …

Member Avatar for WaltP
0
188
Member Avatar for swissknife007

[CODE] #include<stdio.h> #include<conio.h> #include<stdlib.h> struct node {struct node * left; struct node * right; int info; }; typedef struct node node; node * root=NULL,*loc,*par,*save,*child; int item; void pre(node *); void in(node *); void post(node *); void find() { node * ptr; loc=root; par=NULL; if(root==NULL) { loc=NULL; par=NULL; return; } if(root->info==item) …

Member Avatar for swissknife007
0
241
Member Avatar for Curtisq

So my problem is writing a program that asks the user to input a number wich is stored with scanf then print the binary representation of that number in 32 bits, as in if the number is 1 i would need 31 0's and a 1. [CODE]#include <stdio.h> void dec_bin(long …

0
102
Member Avatar for aero31aero

Everytime I run this program and enter a new record, it gets terminated on these statements: [CODE] stud.pcent=((stud.mhin+stud.meng+stud.mmat+stud.msci+stud.msst)*100)/(mm.hin+mm.eng+mm.sst+mm.sci+mm.mat); fwrite(&stud,recsize,1,file); [/CODE] The whole program is this. It is only partially complete. [CODE] #include<conio.h> #include<iostream.h> #include<stdlib.h> #include<string.h> #include<stdio.h> #define UARROW 72 #define DARROW 80 #define ENTER 13 #define ESCAPE 27 int key; …

Member Avatar for aero31aero
0
183
Member Avatar for Cupidvogel

Hi, I am following the chapter on Replication from the book High Performance MySQL. There it is written that I need to enable binary logging and specify a server ID for my MySQL server. It instructs me to write (or verify the presence of) the following lines in the master’s …

0
119
Member Avatar for prem2

Dear team, Please explain, which one will be faster in Mysql for the following query? SELECT * FROM `userstatus` where BINARY Name = 'Raja' [OR] SELECT * FROM `userstatus` where Name = 'raja' Db entry for Name field is 'Raja' there is no key for the field. I have 1000000 …

Member Avatar for iw2011
0
170
Member Avatar for falconmick

Now, I know the first thing I am going to be told is that I should add a balance function to my binary tree, well I have asked the group member who created our tree to do it, but he hasn't got back to me yet. So rather than wait …

Member Avatar for mike_2000_17
0
437
Member Avatar for khsoccer

I am having trouble with making my program read in binary and convert it into an integer so that I can do arithmetic on it, and then output it back out as binary. Here is my code. The first part of it works, and I can read in the 2 …

Member Avatar for D33wakar
0
255
Member Avatar for Rupindersingh

Can anyone please debug the following binary tree program, it flashes two errors: 1: Type mismatch in redeclaration of 'strdup' 2: Tpe mismatch in redeclaration of 'talloc' [CODE]#include<stdio.h> #include<ctype.h> #include<string.h> #define MAXWORD 100 struct tnode *addtree(struct tnode *, char *); void treeprint(struct tnode *); struct tnode { char *word; int …

Member Avatar for Narue
0
242
Member Avatar for TrustyTony

Very trivial program which could be thought as conclusion from the Quiz posts (thanks Gribouillis for inspiration for format)

Member Avatar for TrustyTony
0
192
Member Avatar for khsoccer

I have a program assignment in my C and Unix class that allows the user to enter two numbers in binary seperated by (*,+,-,or /). It then has to produce an answer and loop back to the beginning. It also has to have an option to exit. Can anyone help?

Member Avatar for Schol-R-LEA
0
441
Member Avatar for massivefermion

I think its more than a year that I ask my questions about programming in this forum.Looks like its the time that I help a little too. So I wanna put my best here.I hope it'll help some one. Still I'll appreciate any suggestion. Another point,It was my first time …

Member Avatar for massivefermion
0
454
Member Avatar for TrustyTony

Lookup table is usually the fastest method to find function value, if number of values is small. Here we demonstrate the principle by using task of showing the value of byte as binary string or transforming binary string to byte binary value.

0
449
Member Avatar for Nicco

Hi there, I'm working on a map for a class assignment and running into trouble. I've tried looking around the web but couldn't find anything that helped. I know how insertion works on a basic level when returning a node pointer but think i'm missing some key ideas when using …

Member Avatar for Nicco
0
2K
Member Avatar for pi_lord12

Hey guys, I'm working on a project to use Huffman trees to compress a text file into binary. For instance, based on the frequency of the characters in a string like "aardvark", a - 3 r - 2 d - 1 v - 1 k - 1, compression using a …

Member Avatar for pi_lord12
0
216
Member Avatar for Nathan Campos

I was looking at a page called [URL="http://blog.sarathonline.com/2009/02/javascript-convert-strings-to-binary.html"]Javascript: Convert Strings to Binary (and representing in a nerdy way!)[/URL] where you can convert a [icode]String[/icode] into binary dots using Javascript and I loved that, but how I can do that? Since the code isn't for making that grid...

Member Avatar for Airshow
0
212
Member Avatar for G_Waddell

Hi I'm writing a site that allows users to download documents securely stored on the network off of the web server. I'm using a com object on the server that we've been using here for ages that fetches the file from the network in a binary stream thus preventing user …

Member Avatar for G_Waddell
0
1K

The End.