228 Topics

Member Avatar for
Member Avatar for Niatia

Hi, I'm a bit of a newbie to Pascal and I'm trying to create a simple program to convert binary numbers to decimal, I'm unsure of how I can disallow an input that is not binary, this is my code: var Validation : boolean; Binary, Number : String; Decimal, index, …

Member Avatar for pritaeas
0
326
Member Avatar for fyra

Hi people. I have a remove function that should set a hide member of a node to 1 instead of actually remove the node. The function works well when I insert and remove top and tap respectively (both nodes have their hide member set to 1) but when I insert …

0
146
Member Avatar for fyra

Hi everyone. I'm tying to understand the instruction below. I wish someone could explain me what it means: tree->destroy(((AvlNode*)(*position)->data)->data); // destroy the left branch of the binary search tree starting from the specified node static void destroy_left(BisTree* tree, BiTreeNode* node) { BiTreeNode **position; // can't remove from an empty tree …

Member Avatar for Nutster
0
372
Member Avatar for Tortura

Hi, I want to serialze an object. I use the binary formatter because it's a very complex object. I solved a lot of SerializationExceptions, but there are two that I don't understand or know how to handle. It says "The type "Ivi.Visa.Interop.FormattedIO488Class" in assembly "Ivi.Visa.Interop, Version=3.2.0.0, Culture=neutral, PublicKeyToken=a128c98f1d7717c1" is not …

Member Avatar for skatamatic
0
183
Member Avatar for gtkesh

Hello everybody. Here is my remove method for bst. As you all know, there are 3 cases to consider while removing a node from bst. For the last case, when a node (which is to be removed) has 2 children, I want to use predecessor instead of successor to change …

0
119
Member Avatar for calvintmoss

So I am using spim and I am trying to figure out how to take a users input say "16" and then print it as 9 digit binary number. for example 16, 000010000 or say 4, 000000100, 67 01000011 etc etc always 9 spaces and in binary. I have all …

Member Avatar for sbesch
0
379
Member Avatar for amnakhan786

Hi, i have this piece of code, the encoding function creates a file of binary 1's and 0's but since i am getting output in a text file, the result is shown as ASCII characters which appear as garbage. can anyone please tell me what should i add in the …

Member Avatar for Ancient Dragon
0
98
Member Avatar for somjit{}

i was searching for a code to perform binary XOR addition. Exams coming up, and needed to a quick way to create and verify standard array tables. However, i didnt find anything substantial on the internet, so made my own version of it. can anyone take a look and tell …

0
172
Member Avatar for thammalatha

Hi, Iam using filestreams to create binary file (c:\\..\\abc.bin).I want to put some checksum when i try to open the file through programming ,like if it is previously modified through another application or done manually.At the point of opening the binary file i need to perform some checksum by checking …

Member Avatar for thammalatha
0
336
Member Avatar for Blousey17

1. I need to store numerous records in one binary file. Each of the records needs to include a name and an answer to a question. I know how to set up and add one record but how do i set it up so that I can add others at …

Member Avatar for pritaeas
0
463
Member Avatar for nah094020

Ok cant seem to find the null pointer exception error on my code one moment its working fine the next when i add the 20 i get an error, and i dont know if this is what messing my find method. Between my tree is supposed to be a binary …

Member Avatar for Taywin
0
215
Member Avatar for nah094020

Ok so this is my task: Description: Create a generic class called GenBinTree. GenBinTree will use nodes that store a value of the generic type to store its contents. This tree will not be a search tree (no ordering of nodes by value). What ges me its the the part …

Member Avatar for Taywin
0
645
Member Avatar for de Source

hi i have an string array in which i have combinations of 0's and 1's like on index 0 i have "01", on index 1 i have "11", on index 2 i have "00", on index 3 i have"10" etc is their any possibilty that i can take these values …

Member Avatar for ddanbe
0
211
Member Avatar for somjit{}

**the code works perfectly, just i got something i dont understand...** i'v been trying to get a hold of recursion and sorting for about 3-4 days now, im getting some of it, but still not happy enough.. i searched for some good code for binary search and merge sort on …

Member Avatar for somjit{}
0
424
Member Avatar for Rishabh876

so i was trying to make a binary tree program. just inserting and deleteing. some how i messed up. i think insertion is ok till level 1 after that stays on level 1 only. also the function to delete the whole tree is not working. it only deletes node at …

Member Avatar for Rishabh876
0
314
Member Avatar for meda.gharib

Hi everyone I'm stuck on a school project. The Following is the prompt: > Write an assembly language program that prompts the user to enter a string to be interpreted as an 8-digit hexadecimal number. Your program must convert the ASCII string representation of this hexadecimal number into a 32-bit …

0
488
Member Avatar for cody.reddoor

public void inOrderTraversal(TreeNode node) { if(node == null) { return; } inOrderTraversal(node.getLeft()); System.out.print(node.getKey() + " "); inOrderTraversal(node.getRight()); } I wrote this code for going through a binary search tree and printing out the items in order from low to high. it works just fine but i need to get it …

Member Avatar for Taywin
0
279
Member Avatar for nyquist

Hi, i need to create a binary matrix (one which elements can only be 1 or 0) in openCV. The nearest that I was getting is creating a matrix which elements are 8-bit values using the CV_8UC1 dataType. There must be another dataType which specifies that the matrix elements are …

Member Avatar for vijayan121
0
6K
Member Avatar for tvm78

Alright, so I am designing a program that contains binary trees to function as a parser. I have encounted a very strange problem that is causing my program to fail while it is running. I have done several tests and narrowed down the incidents. Ok, so this results in a …

Member Avatar for mike_2000_17
0
341
Member Avatar for daniel.krishnasamy

Please Help me with this Date Operation Program. I think that this works....yet! Thanks #include <iostream.h> #include <conio.h> int a[7]={1,3,5,7,8,10,12}; int b[7]={4,6,9,11}; class manipdate { int date; int month; int year; public: int d,m,y; void getdata() { cout<<"\n\n Date : "; cin>>date; cout<<"\n Month : "; cin>>month; cout<<"\n Year : …

Member Avatar for Ancient Dragon
0
541
Member Avatar for samohtvii

I am looking to create a binary tree and then print it out. I am getting some strange errors I cant fix. #include <stdio.h> #include <string.h> struct animalTree { char data[100]; struct animalTree *left; struct animalTree *right; }; typedef struct animalTree aTree; void fillTree(FILE*, struct animalTree*); int readNext(char*, FILE*, int*); …

Member Avatar for deceptikon
0
265
Member Avatar for beela16

Python & binary tree help PLEASE?!?????????please please please help me in anyway :'(? Write a Python program that : a: Takes in as input a list of numbers (Note that you have to type in these numbers using the keyboard) using: def insert(tree, key): if len(tree) == 0: return [key, …

Member Avatar for Lardmeister
0
271
Member Avatar for samohtvii

Hi all, I am having trouble getting a tree to and from a text file. The text file will hold questions and animals. Each node should hold one question and one animal. So if you can imagine: Does it have 4 legs? / \ Does it purr? Does it swim? …

Member Avatar for samohtvii
0
3K
Member Avatar for kovacsakos

I would like to make a memory allocation: `(*matrix)[i]=(int*)malloc(sizeof(int)*sz);` But I have got an error message: Invalid operands to binary * What should be the problem?

Member Avatar for kovacsakos
0
173
Member Avatar for keryll

hi i am making a Bcd to Binary conversion can somebody help me lessen the code? thanks. //! Converts a two-byte, 3-digit, BCD number into a binary value. extern uint16_t BcdBin( const uint8_t* const pBcdBin); //uint16_t BcdBin(const uint8_t * const pBcdBin) int main() { int Num; int A=0,B=0,C,D,E=1; int F[100]; …

Member Avatar for WaltP
0
222
Member Avatar for vikingsheepman

Hello all! I have used this forum many times in the past to solve a variety of programming related problems, but am truly stumped on a segfault within a binary search tree. I have isolated the segfault to a fscanf statement that look legitamate to me. The following code blocks …

Member Avatar for vikingsheepman
0
262
Member Avatar for trishtren

Hello, I am trying to recreate a data type in java used by adobe, it is an unsigned integer 30 bits long or U30 by the specification. Anyway i am having problems understanding the binary output, the definition states: "The variable-length encoding for u30 uses one to five bytes, depending …

Member Avatar for trishtren
0
178
Member Avatar for starkk

#include<stdio.h> #include<stdlib.h> int input(int *a) { int n,i; printf("enter the no of elements:"); scanf("%d",&n); for(i=0;i<n;i++) { printf("enter the element:"); scanf("%d",a++); } return n; } int key_input(int *a,int key) { int k; printf("enter the key value which have to be searched in the array of no's provided:"); scanf("%d",&k); return k; } …

Member Avatar for Ancient Dragon
0
190
Member Avatar for vegaseat

The computer is a binary beast. We want to go from the one-fingered digital box to the ten-fingered human being and convert binary to denary(base 10) numbers. This is how it works, for instance, binary 10010 is calculated as 1*16+0*8+0*4+1*2+0*1 = decimal 18. Just because it's easy, let's throw in …

Member Avatar for soorajshaji
0
2K
Member Avatar for valestrom

I kinda want to code in binary just for the fun of it. But I have no idea how to compile my code. Anyone know how?

Member Avatar for ModernC++
0
2K

The End.