General C++ Programming - December 2011 (Page 28)

Header file not being included?
 
As my project for a c++ course, I'm making a sort of small console game. I am trying to call a function from class Player in Player.h (shown below) in class Ite...
[8 replies] Last: Thank you so much for all the help. I had accidentily included a the c... (by zacpac0903)
My search functions are not working.
 
Hello, I am creating a c++ program for my parents and this code will compile, bring in the data file but my search function isn't working. here is the code ...
[17 replies] Last: UGH! I was plugging in wrong value to the function! No wonder why it d... (by Yung Han Jeong)
Tree help
 
Hey guys im having trouble traversing a tree. The assignment is to decode morse code. I have the tree built, but its the search im having trouble with. i can g...
[7 replies] Last: A recursive call isn't expensive, but due to the nature of recursion y... (by naraku9333)
my project has stop working
 
Hi every one .... I am a new student at IT technology...... I cant find the problem here : #include<iostream> #include<cmath> using namespace std; ...
[1 reply] : main must return int. = assignment operator == comparison operator Y... (by ne555)
Getting input without stopping program
 
Can I get input without stopping the program I was thinking getch would work, but i dont have much experiance with it though. Here is how I plan to use it. w...
[3 replies] Last: http://www.cplusplus.com/forum/beginner/5619/#msg25047 Good luck! (by Duthomhas)
Can't set pointers to dynamic arrays equal to eachother correctly
 
I have a project in my programming class. In the project I need to create a dynamically allocated array in a template class. One of the things the class needs t...
[7 replies] Last: wanted to be thorough You were using delete on the same memory tw... (by Moschops)
Big O notation help
 
Just need a little clarification between these two big O notation functions. Which is more efficient and why? O (n^2) vs. O (n (n-1)/2)
[5 replies] Last: There is no point to write O(n^2 - n), since n << n^2 if n -> infinity... (by tfityo)
DOUBLE DECIMAL STRUCTURE FUNCTION HELP
 
Hello, How do you display the numbers in the sample output at "4.00" and not as just "4"? //Project last //Jessica Brown 7 Decemeber 2011 // Demonstrates ...
[no replies]
by CCDD
Read txt file line by line, and then upside down the lines order
 
Hi, Im having a hard time to read and write the txt files. For example, my original text file is like this: Line 1 Line 2 Line 3 And then I want to read...
[7 replies] Last: @Cubbi, it worked perfectly! :) thanks! (by CCDD)
Need Quicksort Help
 
I need to make a quicksort program that tells me how many swaps quickosrt goes through from a array that holds 10000 elements with a random number generator. I ...
[1 reply] : Try placing a cout << "Partition(" << iSize << ")"; at the be... (by mmay)
by swinny
it seems that my .h files arent being included
 
deleted code as my assignment as been submitted and i will be done for plagerism against myself (yes thats somehow possible lol
[16 replies] Last: That is indeed what you need a static int for. Please refer to my p... (by mmay)
Operator overloding advice needed
 
Hi, I have 2 interrogations about operator overloading : 1 : is there a convention on how to define conversion/assignment/arithmetic operator between classes ...
[4 replies] Last: What i tried so far was to overload the binary operators in my new cla... (by bartoli)
Game of Life Hash Table help
 
Hi everyone, I am trying to use my HashTable template with a Game of Life simulation. The hash table is made of a static array of STL lists. It compiles and r...
[3 replies] Last: Check your clear method for HashTable. You are calling data .clear(... (by SIK)
creating new data type on top of built-in type
 
I am trying to create a new type that will take a binary packed input (unsigned long shown below) and unpack it into another type (double shown below). I c...
[5 replies] Last: So, with overload you mean override ? class Value { public: virtual... (by hanst99)
BIG question
 
hello everyone ,,, i have a question in this code #include<iostream> struct A { A() { std::cout<<b()<<'\n'; } int b() { return 5; } }...
[5 replies] Last: If you declare the member function static you don't need to have an ... (by Caligulaminus)
Protected Members and Operator overloading
 
Hello. I have the following problem. Simple example Inside the A.h class A { public: friend ostream& operator<<(ostream &out, A const c);...
[2 replies] Last: Thanks a lot! And thanks for the quick reply. (by n00bStudent)
Input image file for 2D DFT Processing
 
Hi all, I want to input a 2D black & white digital image (jpeg) into my C++ program for 2D DFT analysis, which ultimately I will be applying a high or low pa...
[2 replies] Last: Thanks much! (by goPack85)
cannot convert 'struct name' to ‘class name' in initialization
 
Dear all, I have a struct and a class : struct book{ string name; string author; string publisher; string trasnlator; bool translation; int ...
[4 replies] Last: I said nothing of the sort; I pointed out your mistake and nothing mor... (by LB)
by MoGuL
How to remove duplicate array elements in an efficient way?
 
Hi guys. I have a question regarding a 2D array of edges, where an edge consists of 2 pixels. I'm working just in plain C, so not in C++ and my List output l...
[9 replies] Last: I see you aren't sorting. If you used a good sorting algorithm, like q... (by hamsterman)
Need a hand.
 
I need this code to work desperately, this is my code, (keep in mind some of the actual code has been replaced with comments like in the first if section(you'll...
[9 replies] Last: and I know that true is a boolean literal but I mean what condition a... (by Moschops)
December 2011 Pages: 1... 2627282930... 39
  Archived months: [nov2011] [jan2012]

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