228 Topics

Member Avatar for
Member Avatar for Iamthecheese

Okay, so I have a rather easy problem that I can't seem to figure out. I'm getting cannot find symbol errors for T item=(T)input.next(); The program is a test file for a Binary Tree program. I was told the input 'item' has to be in T type. Obviously they have …

Member Avatar for Ezzaral
0
2K
Member Avatar for Labdabeta

I have a problem that I am having trouble solving. I have a string of undefined length containing '0' or '1'. I need to convert this string to decimal... but I CANNOT store it in anything but another string. My issue is how to do this?! I have been thinking …

Member Avatar for nezachem
0
146
Member Avatar for NumeroUno123

So essentially I'm prompting the user for two binary numbers. How can I add these together? I don't know how to get the 0b in front the the original input. If there is an easier way to do it, please let me know. #Prompt the user for two binary numbers …

Member Avatar for britanicus
0
159
Member Avatar for jnewing

[CODE] // foo vector of unsigned chars // contains 0x00, 0x00, 0xb8, 0x01, 0x00, 0x00, 0x00, 0x1F, 0xEC 0x82 std::vector< unsigned char > foo; long some_long = (long)&foo[6]; // i want the unsigned chars 0x00, 0x1F, 0xEC 0x82 to // make up the long decimal value of 2092162 [/CODE] Now …

Member Avatar for Insensus
0
207
Member Avatar for manofhouse

Program is suppose to convert binary to hex.. it says that i need a class/struct/union to the left of ".substr" but im pretty sure convert should be working.. [CODE]#include <iostream> #include <string> using namespace std; int main () { string convert [8]; string bin[16]= {"0000", "0001","0010","0011","0100","0101","0110","0111","1000","1001","1010","1011","1100","1101","1110","1111"}; string hex[16]= { "0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"}; …

Member Avatar for Tomi1988
0
411
Member Avatar for manofhouse

Trying to convert from binary to hex but for some reason it keeps bringing up the error instead of the output [CODE] #include<iostream> #include<string> #include<cmath> using namespace std; void BintoHex (int[]); bool CheckBin (int[], bool); void Hexadecimal (int[]); string hexadecimal; void main() { int bin[4]; int binary; bool reentry = …

Member Avatar for Narue
0
228
Member Avatar for manofhouse

ok so for some reason its telling me my "else" has no matching "if" in line 51, i have to make it so the binary output is spaced which im pretty sure i did and has to have a separate output if the character length is more than 8 [CODE]#include<iostream> …

Member Avatar for WaltP
0
458
Member Avatar for manofhouse

Need help converting from hex to binary any help is very appreciated!! [CODE]#include <string> #include <iostream> class Hex { private: //constructor std::string hexNumber; int decNumber; public: Hex(std::string hNum): hexNumber(hNum) {} Hex(int dNum): decNumber(dNum) {} ~Hex(); int toInt(); std::string toBin(); std::string toHex(); }; [/CODE] it keeps saying i need to put …

Member Avatar for VernonDozier
0
412
Member Avatar for mpassaglia

Hello DaniWeb! I've been struggling with a small detail of this program for a few days now, and haven't come up with any solutions on my own. The basic gist of the assignment is to fill an array with random numbers, sort it, and then search for a number in …

Member Avatar for mpassaglia
0
401
Member Avatar for november_pooh
Member Avatar for Bilal gulbaz
2
3K
Member Avatar for Gribouillis

This snippet defines a function [icode]a2bits[/icode] which converts a characters string to a string of 0's and 1's showing its bitwise representation.

Member Avatar for Gribouillis
0
2K
Member Avatar for vineeshvs
Member Avatar for cousinoer5

I thought this program was as good as done, turns out, it's more broken than I thought! Right now I'm in a panic, since it's due tomorrow, and I have a few big problems with it. Problem 1: I need to either open an existing file, or a new one …

Member Avatar for cousinoer5
0
204
Member Avatar for COL_Milkshake

I desperately need help with a project I am working on. I need to create and implement a Binary Search Tree Header file. I am having great difficulty with this and was hoping I could find some help here. This is what I have done(note: I am aware that the …

Member Avatar for COL_Milkshake
0
3K
Member Avatar for 24x24

I am to write a program that converts either binary, hex or octal to decimal. We are to use methods for the first time (Not a problem). I have written almost all of the code but the conversion. We can't use int.toDecimal or any shortcut. All must be long coded …

Member Avatar for 24x24
0
230
Member Avatar for cousinoer5

I'm taking an advanced C++ class now, and everything up to now has been pretty simple (mostly review stuff), but now we got to binary file io and it's kicking my butt. This program is supposed to read from a file called "Hardware.dat" (or create it if it doesn't exist), …

Member Avatar for cousinoer5
0
471
Member Avatar for methmignonne

hi. im doing an edge detection which will detect edges of each RGB channel and then combine them to show it as a final output. im now having a problem with combining the three as it doesnt show me a binary image, instead it has some colors on it. i …

0
196
Member Avatar for uchiha203

Hello everyone, before i ask this question i would like to say first that im a beginner in asp c#. I would like toask for a tutorial on making a download button for binary datas. My file upload is already working fine. I just need a download button so i …

Member Avatar for jugosoft
0
80
Member Avatar for speedy94519

Hello, I would like some help on this one problem in my assignment. I have completed the table but something caught my attention and i feel i did something wrong. I attached the same table i filled out on this thread. I would like help on the first row. My …

Member Avatar for lillygil
0
203
Member Avatar for Brianbc

This Christmas day, I am plagued by this negative nibble mystery. I have some bytes in a byte array that I want to split into nibbles [CODE] x = bytes(n) x = x << 28'cause the left 4 bits to overflow so we remain with only the right 4 bits …

Member Avatar for Brianbc
0
81
Member Avatar for Iamthecheese

Hello, I'm getting quite flustered with this program and the errors are starting to get harder to debug. This is my tree.java file: [CODE]package TreePkg; import java.io.FileNotFoundException; import java.lang.SecurityException; import java.util.Scanner; import java.util.NoSuchElementException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.Serializable; import java.io.EOFException; class TreeNode<T extends Comparable <T>> …

Member Avatar for JamesCherrill
0
228
Member Avatar for waleed.makarem

Dear All , I have a binary file , the defincition of its content is as below L Here is one of my 'log items' from the data.bin, all data is stored in little endian (ie. least significant byte first) 11 63 39 46 --- Time, UTC in seconds since …

0
87
Member Avatar for waleed.makarem

Dear All , The question is quite simple for all of you . I have a binary file . A description for this file says that : "first 2 bytes in the header is the number of records" I have opened this file and loaded it into bytes by this …

Member Avatar for waleed.makarem
0
224
Member Avatar for waleed.makarem

Dear All , I have a device with upon serial communication , it send the data as HEX values , (eg, C020042ABD0F91A103E400F929EBC) . I use the following code to get data from the serial port. [code] Dim fStream As New FileStream(sFileName, FileMode.CreateNew) ' creates new file Dim bw As New …

Member Avatar for Unhnd_Exception
0
1K
Member Avatar for lasl0w

Hey all, I'm writing a program that is an address book using an AVL Node structure (which was provided). I defined the [I]contact[/I] class as the ItemType of the data to be inserted in each node. Initially I encountered a Segmentation fault that occured during the assignment from the AVLClass …

Member Avatar for lasl0w
0
973
Member Avatar for lasl0w

Hey all, I'm doing a project to create an address book which uses a binary search tree (AVL node) structure to store, search and sort the data. There are 14 main fields for each address contact. All fields can be represented as strings. The 14th field can have unlimited entries. …

Member Avatar for mike_2000_17
0
196
Member Avatar for Mushida

Sorry but I'm having a problem whit this function that is meant to let me edit records in a binary file. After I enter what I want to change an attribute to the file remains unchanged. [CODE]void updateStudent(fstream & file) { S students; long lenth; char snum[10]; char editChoice = …

Member Avatar for Mushida
0
197
Member Avatar for schoolboy2010

Hi My program is supposed to implement a binary tree with an insert, remove, copy, pre-order, post-order and in-order views. Problem is that my code compiles... but doesnt work. Could someone help me out. Thanks. I attached the code... [ATTACH]18222[/ATTACH] [ATTACH]18223[/ATTACH] [ATTACH]18224[/ATTACH]

Member Avatar for schoolboy2010
-1
158
Member Avatar for cwarn23

Hi everybody. I have a question about the best way to retrieve a list of possible source values from the & operator without checking every combination between the range required. The basic problem I face is I have [B](a&b)=c[/B] I know the values of b and c but need to …

Member Avatar for TrustyTony
0
210
Member Avatar for ace8957

Hi all, So I have reached a kind of impasse on my current project. I'm trying to make a program that can function like a phone book, loading information from a file into a binary search tree and performing operations on said information. The issue I'm having appears to be …

Member Avatar for ace8957
1
7K

The End.