228 Topics

Member Avatar for
Member Avatar for Whoever90

Hi, I try to convert a tuple into binary number but I keep getting the error like"ord() expected string of length 1 but tuple found" Can anyone help me in this?

Member Avatar for bumsfeld
0
75
Member Avatar for Dhanika

Greetings everyone! I hope to learn and become better in programming. But honestly, my heart fails me everytime I face a new assignment. This one is just another heartache. Thing is, the question wants me to print out n-bit strings in lexicographical order ( meaning increasing order ). And I …

Member Avatar for Dhanika
0
2K
Member Avatar for mistercow.pnoy

Okay, I know this is really really simple, but for the life of me, my brother and I cannot get this to work properly. [LIST] [*]We have a number in Cell D4(and down). [*]In E5 is the binary conversion of D4. [*][*]In F2-N2 we want to have the individual numbers …

Member Avatar for mistercow.pnoy
0
127
Member Avatar for vegaseat

Convert a decimal (denary) integer to a binary string. An exercise in do ... while and while loops.

Member Avatar for arun26
2
2K
Member Avatar for jagan605

i recently started typing the code for the program to convert a binary number to its decimal form and i got stuck when my compiler reported this error. this is what i have typed till now. [CODE]#include<iostream> using namespace std; #include<math.h> main() { int n,s=0,k=0,a,b,c; cout<<"\n\n\tPROGRAM TO CONVERT BINARY TO …

Member Avatar for jagan605
0
196
Member Avatar for evilsweeps

Hi, this is my first post on here so forgive me if my question or code is unclear. I'm coding a binary search tree and I'm stuck on the overloaded ==operator. [CODE] //BSTCLASS.CPP template <class ItemType> void BstClass<ItemType>::rFindNode(node<ItemType>* trav,ItemType& item,node<ItemType>* rtTrav, ItemType& rtItem, bool& equal)const { rFindNode(trav->left, trav->left->data, rtTrav->left, rtTrav->left->data, …

Member Avatar for evilsweeps
0
261
Member Avatar for Xamas

I'm going to put the text information to "data.bin" file in binary mode. Then i'm goint to read that information from file. I did by using "FileOutputStream", then "ObjectOutputStream" class and his "writeObject();" method, but this one just puts serialized object data to file, and as I understand - that's …

Member Avatar for javaAddict
0
152
Member Avatar for BigTito89

Hi, I'm having a problem wrapping my head around a problem. Here is the problem: Develop a program that will input a binary string and then, using bitwise operations, do a two's complement on the string and display it. Use UNSIGNED data types for the bit strings. So far, I …

Member Avatar for r.stiltskin
1
911
Member Avatar for DarthPJB

Howdy, those of you who remember me may be happy to know my 2D game engine was finished and I'm now working on a 3D engine. My engine has been going rather spiffingly well, after some battles with DirectX and OpenGL i managed to get them working side-by-side. Wrote a …

Member Avatar for DarthPJB
0
297
Member Avatar for Kennych

Hey can anyone tell me whats wrong with my code? I'm getting a program freeze. [url]http://i47.tinypic.com/wh1ez5.png[/url] I'm doing a binary search tree, BST.CPP [url]http://pastebin.org/57667[/url] Person.CPP [url]http://pastebin.org/57669[/url] TreeNode.CPP [url]http://pastebin.org/57670[/url] Main---Where I call the searchTreeInsert function [url]http://pastebin.org/57674[/url]

Member Avatar for programmersbook
-1
146
Member Avatar for big_guy_bri

We are working on a header file for a template class called TreeNode. My class definition is as follows: [CODE]#include <iostream> using namespace std; template <class T> class BSTree; class TreeNode<T>; { friend classBSTree<T>; public: //constructor TreeNode( T = T(), TreeNode<T>* = 0, TreeNode<T>* = 0 ); private: T data; …

Member Avatar for Narue
0
104
Member Avatar for codewalkz

Anyone who knows how to apply this in php scripting? the scripts in this site can be xecuted in mysql console but I can't get it working in php script in the website im studying. I want to create a tree like this: [URL="http://sitepointstatic.com/graphics/sitepoint_numbering.gif"]http://sitepointstatic.com/graphics/sitepoint_numbering.gif[/URL]

Member Avatar for codewalkz
0
440
Member Avatar for simonsayz27

Hey everyone. I first post and I couldn't figure out how to encase my code, sorry. Let me know and I'll do it next post. Anyways, I've built binary tree using recursion and included a function to print out the sum of the level of the tree of a given …

Member Avatar for codewalkz
0
352
Member Avatar for jakethesnake86

I got the following code out of Carrano's Walls & Mirrors. I made a few changes but have tested it and it works. I'm really confused by line 19 in the .h file. Why is it structured like "void (*FunctionType)"? Why not (void*) FunctionType? or void* FunctionType? What is the …

Member Avatar for ross42111
0
124
Member Avatar for TigerGirl

Hi. I have a recursive public static method search that takes a Tree node (any arbitrary binary tree, not necessarily a search tree) and returns whether or not that tree satisfies the order property for a binary search tree. So, my method is [CODE]public static boolean search(TN t) { if …

Member Avatar for TigerGirl
0
201
Member Avatar for seo2005

To convert 1310 to binary, the steps are as follows: 13/2 = 6 remainder 1 6/2 = 3 remainder 0 3/2 = 1 remainder 1 1/2 = 0 remainder 1 I didn't understand the last step. How can 1/2=0 . It should be 0.5 And how can remainder be 1. …

Member Avatar for BestJewSinceJC
0
86
Member Avatar for hny_lyn

To begin, we were asked to make a TREE... It says that we should traverse the left subtree of the ROOT/NODE in postorder and then make a copy of it... Next is to traverse the right subtree of the ROOT/NODE in postorder and then make a copy of it... Lastly, …

Member Avatar for quuba
0
525
Member Avatar for NiGhtMarEs0nWax

Hi, i've just taken higher computing in college and need to know a couple of things before i can proceed further with the course. The first is how to represent floating point numbers in binary. i have a good grasp of binary & data types etc. there are a few …

Member Avatar for Rashakil Fol
0
165

The End.