General C++ Programming - November 2010 (Page 17)

General Game problem
 
Heres my problem. When Start = 0, computer starts, gives indication that human won and then that computer won but doesn't return to top of game and prompt user ...
[2 replies] Last: This is what I get when I enter 0: Would you like to play a game? P... (by HooklessFastener)
Binary Tree length
 
Instead of counting the nodes in a binary tree each time to get the length of the tree, Can i just have a length private Data that i can increment or decrement ...
[1 reply] : How many times are you going to ask for the size? I mean maintain tha... (by ne555)
C++ Manager Class
 
Not the employee manager but an actual manager class that manages something... So I have this class: Manager. This class manages a class called: Session...
[2 replies] Last: o. Not sure why this stuff has been lapsing my mind as of late.... (by closed account S6k9GNh0)
Make File compile error
 
I have a program using classes that I am trying to compile using a make file (required by professor). The program has a Main.cpp, Money.cpp(class), & Money.h. T...
[2 replies] Last: make file (required by professor) *shudders* *hugs farmergeoff... (by Disch)
Sorting Two Dimensional Array
 
Is there a way to sort a two dimensional array by row? For example i would want to sort in ascending order between: array array array So if the ...
[4 replies] Last: Thank you Filipe :) That worked great! (by tylerd213)
by alexbg
sqrt
 
earetgwetserta
[4 replies] Last: I don't know what is a your class Line. You don't need it. Just use t... (by ne555)
Binary Search Trees
 
Why do we need recursive helper functions in Binary search trees? For example, why do we need int CountNode(TreeNode* root) to be called by int GetLength(). Bec...
[1 reply] : What was I thinking..... Geez! Sorry guys, my bad! (by nkmarcus)
App runs in during debug but on it's own?
 
Hi there, I have a very simple piece of code - but it only returns the right value when I am stepping through it with a debugger. The code is below... co...
[no replies]
What's wrong with the globle variable??
 
Here is the code: #include <iostream> using namespace std; int first; int goal; int Tempor_ans=0; char Tempor_op ; char op ; int No_of_solu=0; int ...
[2 replies] Last: This is a great example of the many reasons why using namespace xxx; ... (by Disch)
C++ char and fstream
 
I have a C++ Program that is suppost to take a file, and send keys of all the contents in it. here is part of it: #include <iostream> #include <stdlib.h> ...
[1 reply] : Line 42 must be Say(stuff. c_str() ,stuff.size () ); // .c_str() retu... (by Null)
Distance-vector routing
 
ATTN: I don't mean to be dramatic but whatever help any of you can take the time to give me on this could make the difference in my passing or failing this c...
[no replies]
Finding Files in Trees on Windows
 
I've been trying to compile Jason Rohrer's The Passage on my windows system using Code::Blocks. But Even though I'm linked I've specified where some of the so...
[1 reply] : Can you post the inclusion directives? (by helios)
A simple macro program to download files
 
Hey guys. I want to write a program for myself which will connect to a website, press the appropriate download links on that download, starts a download manager...
[6 replies] Last: wget +1 (by helios)
File I/O and Looping
 
Hey everyone, This is pretty basic, but I must just not be seeing my mistake. I'm trying to open prog2.txt, which is in the same directory as my program, the...
[1 reply] : Hi Boostermoose, good name that ;-) You need to check if your progr... (by Moooce)
The find function in a linked list
 
Hi I'm having trouble completing the function bool list::find(int x) which returns true if x is in the list and otherwise false. The function is associated w...
[6 replies] Last: [quote=wizard25]this code is good but it crashes if you the value is n... (by ne555)
bbbiiiiggggg pointers problem..
 
Hi.. I'm Carmen and I'm new on this forum... I am dealing with a big problem... I can't figure out why it gives me these errors... I am trying to filter a tex...
[3 replies] Last: You need to delete the memory, when you stop using it and before you o... (by ne555)
Reversing the elements of a linked list
 
Hi I'm having trouble completing the function void list::displayReverse() which basically displays the elements in the linked list in reverse. I have tried...
[9 replies] Last: It is possible to do it in linear time without copying or recursion. ... (by Duthomhas)
by Zaroth
Operator Overloading and Dynamic Memory within a class
 
Hello all, This is a lab exercise for homework due tomorrow, and I'm trying to figure out how to code Person.cpp. Person.h and Main.cpp are from my teacher a...
[8 replies] Last: your copy constructor is still wrong. You allocate the memory which is... (by Galik)
Initiating and reading a txt file
 
Hi guys. I need help with reading a .txt file, and converting every line into a string. For instance, file path is D:\file.txt... What libraries i need, how t...
[18 replies] Last: Yes, i checked the path to it... And i do have permissions, I'm workin... (by Nenad Zivic)
Tough Template Questions
 
#include <iostream> #include <complex> template <class T> class A { public: template <class R> void a(R); }; template <class T> template <c...
[3 replies] Last: Jsmith sorry it doesnt compile I'll post the error when I get home ... (by xxicemanx)
November 2010 Pages: 1... 1516171819... 21
  Archived months: [oct2010] [dec2010]

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