Beginners - April 2011 (Page 18)

by dlugo
Need assistance with binary tree
 
Hi I need help with my binary search tree. This is what I have so far. I have created 2 classes. One that will store an integer value and two pointers to the le...
[no replies]
Hexadecimal Numbers
 
Hello i am currently reading C++ for dummies and i am stuck, cause i am a dummy. I do not quite understand hexadecimals and how they are used in a program. It...
[5 replies] Last: bahaha ignore my answer now that was awesome userulluipeste (by ascii)
Heap Sorting with 2D arrays. HELP!!
 
A Gray-level image may be represented as a 2-D array of pixels with a pixel at row (y) and column (x) having an intensity F(x,y). For an image of size N x N pix...
[1 reply] : Do your own homework (by Acr)
creating an inFile
 
Write a C++ program to calculate boarding bills for a kennel. The cost per day is determined by the weight of the dog according to the following chart: Weight ...
[3 replies] Last: Try changing 'string line, name;' to 'char *line; char *name;' (by Acr)
by mobat
variable being set to 1 :/
 
I have a part of my code which reads: else if (response1 == "tomahawk" && tomahawk.amount > 0) { if (monster.fight) ...
[11 replies] Last: And the flaw was...? (by Acr)
storing a value
 
double TSP(first.parent, second parent) { int index; for(int i = 0;i<5;i++) if(first.parent.i == second.parent.i) return (first.parent.i); else ...
[6 replies] Last: ?? (by jimmy5023)
login
 
Hello, I am trying to make a computer game with a login page. Basicly I want a binary file to keep track of people's usernames and passwords. I am a beginner...
[5 replies] Last: Okay, so what I'm trying to do is create a game that has avatars. I wa... (by codeman)
by rvevea
Going loopy
 
So I'm in the process of troubleshooting a few issues in my code, and this seems to have me stumped. A quick run down: Trying to code a console based tic t...
[7 replies] Last: As long as you aren't doing math you will be better off using a char d... (by Computergeek01)
by AKat
Returning values from class functions
 
I recently picked up Deitel's C++ How to Program 7e. I'm currently working on one of the exercises in the book and I was curious on a different way of returning...
[8 replies] Last: The book I'm going through hasn't described structures yet, so I'm loo... (by AKat)
by lare26
Display time with class member function
 
I am trying to make a member function of a class show the time. Can anyone tell me what I am doing wrong, please? The Includes: #include<iostream> #includ...
[6 replies] Last: I put it in how you showed and it wouldn't work for me. I can't rememb... (by lare26)
problem with recursive functions
 
hey guys, I have an assignment to write a program that count how many islands in a sea here is the assignment Recursive Blob Counting Background: Consi...
[5 replies] Last: Finally int N ; char **A, **B; int *blobcounter = new int[N*N]; //wha... (by ne555)
How to use classes in function using pointers?
 
I have this code class here { public: int h; int b; }; ---> main program <---- here array ; lol(&array); void lol (here *array); { array->h ...
[4 replies] Last: Please disregard the previous content. A better way to do this woul... (by Zeillinger)
need help urgently
 
im required to move a robot 4 direction wid is generated by a random number 1 to 4. if direction is 1 the row will increase by 1, if direction is 2, row will de...
[3 replies] Last: Why dont you make it simple and just do something like a coordinate sy... (by mobat)
What to do ?
 
When I run my program a small window appears say that your program has stopped working. what to do ? how solve this !! please help me , and thanks ...
[3 replies] Last: Try using an if statement at the bottom in the int main() which will t... (by mobat)
Question about keyword "this" in tutorial
 
Hello, I'm stuck at a part of the tutorial. Here is the code: #include <iostream> using namespace std; class CDummy { public: int isitme (CDummy& par...
[6 replies] Last: I did, I get the same output. But just to make sure I wanted to ask. (by BananaCode)
Accessing the value in a pointer
 
I'm trying to do a random shuffle of numbers between 1 and 25. The code on the cplusplus site; // random_shuffle example #include <iostream> #include <alg...
[2 replies] Last: Okay, so in order to use the numbers in numerical order (first value i... (by Jonnyisonfire)
How to represent infinity?
 
Here i want to test the Prim algorithm with Adjacent Matrix, but i don't know how to represent infinity with c++ ,is there a header with #define directive? Plea...
[1 reply] : numeric_limits<double>/*or float*/::infinity() http://www.cplusplus.... (by Bazzy)
Username and Passwords
 
Hello, I want to make a C++ program that has kinda like a database of usernames and passwords. that data corresponding to that user will be shown. please explai...
[3 replies] Last: Just remove the unnecessary ), from the link to get http://www.cplus... (by Zeillinger)
[help]search for my linked list application cannot work
 
im a newb in c++ programming and i have trouble with applying the search feature for my C++ linked list application. I have write the code but the search won't ...
[no replies]
hey super urgent
 
im suppose to generate a random number from 1 to 4 for the direction of a robot. void Robot::move(int direction) { int direction; direction = 0; directi...
[2 replies] Last: direction = rand() % 5; //? (by userulluipeste)
April 2011 Pages: 1... 1617181920... 55
  Archived months: [mar2011] [may2011]

This is an archived page. To post a new message, go to the current page.