228 Topics
|
|
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? |
|
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 … |
|
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 … |
|
Convert a decimal (denary) integer to a binary string. An exercise in do ... while and while loops. |
|
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 … |
|
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, … |
|
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 … |
|
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 … |
|
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 … |
|
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] |
|
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; … |
|
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] |
|
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 … |
|
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 … |
|
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 … |
|
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. … |
|
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, … |
|
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 … |
The End.