49,761 Topics
| |
I need help creating a delete function for binary tree. This is what I have so far... (Last function is what I'm working on) [CODE=C++]#include <iostream> #include <cassert> namespace CS61 { template <class Item, std::size_t MAX> class btreenode { private: std::size_t used; // actual number of values in this node … | |
Hello, I wonder how it works when you want to send an email through a proxy server. I have code below that works if you want to send an email through for example smtp.gmail.com etc. I have put the proxyserver address and port that the proxyserver has as the 2 … | |
Hi guys.I thought about it for a while but i didn't get anywhere.Is there any alternative to polling? | |
I am trying to pass data into a class object and the put that class object into a binary tree. My code was mostly give from the professor, but I am stuck on this part. He gave us the binarytree.h and employee.h. I had to create the emp_tree.cpp. Employee.h: (give … | |
i have declared a variable as uint32_t num; when i take input for this variable i.e cin>>num; cout<<num<<endl; & take its cout, then it gives problem. when i run this program, i gives num value as 12345678, it works fine & give cout. but when i give input as 1234abcd. … | |
i have got 2 cpp files & a header file, which i have included in all 2 cpp files. its like this [U]abc.h[/U] extern uint32_t key; [U]a.cpp[/U] #include "abc.h" uint32_t key; int main { ............. } [U]b.cpp[/U] #include "abc.h" int main { printf("Key: %.8x\n", key); ............. } now when i … | |
| I don't know if this is helpful for moderators but I've put together a code formatter in dotnet which automatically beautifies someone's code. Numerous times you will see newbies posting without code tags. Now the moderators can easily quote the post so the indentation is preserved, but sometimes the posters … |
is their any body tell me the Difference between int* a; and int *a; ? | |
So this is my problem: as the title suggests, I have a Labyrinth class that contains two binary trees made of two different kinds of structs that represent different kinds of rooms. The names are in spanish, so Arbol means tree, Laberinto is the labyrinth class and Sala1 and Sala2 … | |
Hi, I use Fedore Eclipse IDE to run C++ code. I need to use the Scythe Statistical toolbox which implements random number generators from different functions (gamma, beta etc). I have added the toolbox's location to the path of header files in Eclipse and added the [CODE]#include "distribution"[/CODE] (available in … | |
I want to print a float number with it's digits extending to 20000 digits after the decimal i.e. if the number is 10/3, it should print 3.333333333333333333333333333...20000 or more times. So, how do I print something like that? Also, do tell the solution for C and C++ as well... The … | |
| |
Hey guys, I am working on a assignment. I am 90% done with the code. However I stuck on the part where i have to flip the output(vertically and horizontaly). I tried I everything i could. I tried setting the row up side down that way it would help and … | |
This is a program that emulates a supermarket cashier. It includes Login and also uses EncryPro for encrypting customer ID. AC 2010 Main Page : code.google.com/p/advancedcashier2010 EncryPro : code.google.com/p/encrypro | |
Hi, I m having problem with accessing one form (project1) value in another form(project2). I m using VC++ 2008 express edition and i m doing my project pure vc++. I have to store the the project1's textBox value in project2's textBox.. Please help me to resolve this problem. Thanks in … | |
Hello, I'm trying to make a circular list by modifying an existing simple-linked list. I'm having a problem when testing whether or not a node is valid. The old code looked like this: [code] return (elem == NULL); [/code] Now with a circular list I have my sentinel node and … | |
Hello, I'm researching in image processing and need to develop a Gabor filter in C++ and openCV. I found a good sample on which I'm basing my code. Problem is, while I've tried to emulate much as possible the other code, mine is not producing correct results. I changed a … | |
Hi; I made a ATL/MFC application using VS 2008 but its exe is not running on Win Xp or Windows 7. My OS is Windows XP 2002 with Service Pack 3. What could be the problem? Doing some .net Framework Service packs doesn't seem to help much as I already … | |
This code crashes, unless the indicated line is commented out, then it works beautifully. I cannot understand this because it is the 3rd in a series of 4 repetitions of the same thing. Any help is appreciated. Thanks [CODE] int x=0; int y=0; int lp=0; for(lp=1;lp<=4;lp++) { y=0; x++; y++; … | |
Can anyone give me any insight on how to perform a [B]lookup[/B] on a key/definition hashtable? This is the method that I am trying to use to perform the lookup: [CODE] const Object & lookup( const HashedObj & key ) const { return theLists[ hash( key ) ]; } [/CODE] … | |
| |
I am new to C++ and am trying to create a doubly linked list using templates, here is the code doubleLinkedList.h [code] #ifndef DOUBLELINKEDLIST_H_ #define DOUBLELINKEDLIST_H_ #include<iostream> #include"nodeType.h" using namespace std; template <class Type> class doubleLinkedList { public: void initList(); bool isEmptyList() const; void destroy(); void print() const; void reversePrint() … | |
Im learning java, and having trouble with some simple code. Heres my code, can you tell me why the output is disregarding the "Correct!" statement at the end package Otm; import java.util.*; public class Otm { public static void main(String arg[]) { Scanner sc=new Scanner(System.in); String Wash="Washington"; String Ham="Hamilton"; String … | |
Is it possible to use child window created in Win32 API as a container for another windows (controls - buttons, edit fields etc.)? Or is there any other way how to use container in Win32 API? The goal is to create a simple user interface for application? | |
It only has one player, and no it isn't that technical on the rules of soccer. If the ball gets out of bounds there is no penalty shot, it just respawns randomly on the field. My problem is in my lookatball funtion I think, but I am not sure. Sorry … | |
Did a quick search but couldn't find anything on ostream and multiple files depending on data. I'm pretty sure it's something very simple flying over my head, but I can't seem to get this to work. Basically what I want to do is write to a file depending on the … | |
I wanted to write a program that finds the factor of a no. eg 2 and 5 are factors of 10. But that program is not working .Please tell me what is wrong with my program.Also tell me how to finally write like "10=2*5". Despite having learned functions and arrays … | |
I am writing a program in which i will be using 2 functions, one for writing integers into a text file & second for reading them back in integer form. while i did not faced in writing int say 100 numbers into a text file. i am stuck on reading … | |
I am trying to learn how to pass pointers to vectors properly, and having a bit of trouble. I am using Dev-C++ IDE here is the GIRLFRIEND class [CODE]#ifndef GIRLFRIEND_H #define GIRLFRIEND_H #include "player.h" // inheriting class's header file /* * No description */ class GIRLFRIEND : public PLAYER { … | |
Can someone tell me the benefit of header files in C++? I believe there must be good reason for it, but I don't quite understand why. Why would I want to create some code in two seperate files, somewhat repetitive, when I can write it all one time, in one … |
The End.