heh ok i made stupid mistake of printing leaf->right instead of printing leaf->right->nstring *smacks self* so my insert works ok after testing now however print_btree function still prints this:
...
Type: Posts; User: Sicilian
heh ok i made stupid mistake of printing leaf->right instead of printing leaf->right->nstring *smacks self* so my insert works ok after testing now however print_btree function still prints this:
...
ok here is the implementation file i have i changed things around.
i don't know why this is not working however.
#include <iostream.h>
#include <stdio.h>
#include <cstring>
#include "btree.h"...
if i want to recursivly print out a binary tree from lowest to highest order should i recursivly go to max first then work it to the lowest and end with a cout<<leaf->blah;
i'm having a little...
ok i am building a binary tree of char strings and i am trying to use the strcmpi() function to compare strings.
i have
if(strmpi(string,leaf->nstring) < 0)
so if the string is less than the...
ok if i read in a filename into a char string and then i want to open that file how would i do that???
i can't figure it out :P
i changed to the syntax you showed me i think
in_stream.read((char),sizeof(counter)); char counter; char=&buffer[x];
however still when i do out_stream<<*char; it matches the file in the...
ok i just converted the program with that method however it is producing the same results heh.
is in_stream.read((char*)buffer, sizeof(buffer)); different from
in_stream.read((char),count); where...
ok i have a .bin file full of bytes, and i wrote a program to put the max product of 5 consecutive bytes in max. everything works good when i tested it however i reallized that its not reading...
cool it worked thanks =)
i'm not sure. what i have is 5 unsigned chars which are read from a file. then (c1*c2*c3*c4*c5) is stored in the long double sum.
then if sum>max; max=sum; (both are same type)
ok what is...
i wrote a program that gets the product of 5 bytes and stores it
into a long double however when the number gets large it stores
a negative number which corrupts my data. Is there a way i can cast...