General C++ Programming - May 2011 (Page 31)

solving multiple deffination
 
Hello guys, I am having these multiple error while I try to compile my program. Double checked any multiple declaration but couldn't find any suitable answer...
[1 reply] : First guess; both your main.cpp and uCAM.cpp include the same header, ... (by Moschops)
Segmentation error
 
I have a problem of this C++ program when trying to execute it says "Segmentation Error" and did not give which line I need to fix, so... generally, I am doom...
[4 replies] Last: thank you Disch, I am grateful for your help regards, N.Le (by nhanlm0601)
Help with Duff's Device in C++
 
Hi, I am working on this code: #include <iostream> using namespace std; send(to, from, count) { register int *to, *from; register ...
[5 replies] Last: Thanks for clarification. Never heard of it before. (by savavampir)
by stric
In class table
 
Hi I would need one static table to be accessible from three methods. I do know the values at the time of writting code. How can I define global table with ...
[7 replies] Last: I tried with int tab ; and than enter the values in initialize func... (by stric)
stroring game data
 
am supposed to read in data from a file and store it. I know how to read from a file and display it, in main, what i don't understand is how to do that with cla...
[7 replies] Last: Give you a clue - Line 2: bool Game::fillGame(ifstream &din, string ... (by kfmfe04)
rtti
 
Hi! I have derived classes `Angle`, `Azimuth`, `Distance`, `Height` from base class `Relation`. I want to put all of these in a `vector<Relation>` but they ha...
[2 replies] Last: And if you opt for your own rtti, make a rtti storage variable specifi... (by bartoli)
Please need help fixing the errors in array problem
 
#include <iostream> using namespace std; int sixCount(int arr , int nr,int nc){ for(int r=0; r<=nr; r++) for(int c=0; c<=nc; c++) ...
[4 replies] Last: Iteration, stacks, hashes - google on "replacing recursion" for detail... (by kfmfe04)
Im having an issue, this program doesnt compile at all, idk what i did wrong, please need assistance
 
#include <iostream> using namespace std; int biggestEntry(int a ,int rowcap, int colcap){ int ans=a ; for(int r=0; r<=rowcap-1; r++){ ...
[7 replies] Last: oh wow im stupid lol..that was all i needed, damn i hate making errors... (by NYCrealist123)
by chris4
2D array of chars
 
Here is my issue. Inside the function get_data the 2D array names prints and operates fine. However, once in main. It prints this: Am An Be Dan In...
[no replies]
Soda machine with Array and Enumeration?
 
I need help with my program, it is a soda machine and I need help adding Enumeration and Array. For enum I was going to list soda types, how can I add both enu...
[1 reply] : Enums: (at the bottom of this page) http://www.cplusplus.com/doc/tutor... (by GodPyro)
by Makka
Need some help with the "Game of life"
 
hello everyone, i have been working on a uni project that's due in in the next day that requires me to remake this game / simulation http://www.bitstorm.org/gam...
[3 replies] Last: Your countNeighbour() function also will cause segmentation faults wit... (by GodPyro)
.txt file into an array
 
I have a program to write that takes a file and encodes it by putting the ascii value and adding 5 to it and then decodes it by subtracting 5 to the ascii value...
[7 replies] Last: http://www.cdrummond.qc.ca/cegep/informat/Professeurs/Alain/images/ASC... (by closed account zwA4jE8b)
Array problem, need great help, please
 
#include <iostream> using namespace std; //write your functions here int main () { //biggestEntry: cout << "Testing biggestEntry:...
[4 replies] Last: i do make an attempt and trust me ill be ready for my exams in 3 weeks... (by NYCrealist123)
STL Map insertion
 
I have a problem with inserting a new value into an STL map. My map takes an integer value as the key and an array of structs as the value. I have included the...
[3 replies] Last: cacheStruct is a struct...also = array2 doesn't work (it gives me th... (by vthokie11)
by imi
Template specialization "const T" does not trigger member functions?
 
Hi, seems like my compiler (VS2010) does not specialize templates, when the specialization for T is "const T" and I pass a const member function. Is that ...
[3 replies] Last: In test in the original post fails because the pointers don't point t... (by guestgulkan)
Recursive algorithim...returns a 0, whats wrong with the formula???
 
I'm writing a 3 function program for homework. The first and third functions seem to work fine, but the second does not. The function is a recursive fun...
[9 replies] Last: It works! Thanks alot! (by hotdogs113)
Maximize Profit formulas producing an incorrect output
 
Hi y'all! I'm taking a beginners C++ course and we were assigned the following problem as a project: If you have a product that yields a profit of b do...
[9 replies] Last: gj! (by kfmfe04)
Increasing Efficiency
 
Hello, I'm working on an AI for Starcraft 1. I'm implementing a two dimensional array which, on an average sized map, will be 128 by 128. A few operations are p...
[3 replies] Last: You need to turn on debugging (-g for gcc, but I don't know what compi... (by kfmfe04)
Compare two strings for similar characters
 
I need to write a piece of code that can compare a "guess" string to an "answer string" and then output how many characters of answers are contained in guess. ...
[2 replies] Last: i already have the code for correct position AND color. i just need to... (by geoff13)
by firix
Substring class for basic_string
 
Hi how I have complete the following code ? I could not write function member template<class Container> Back_insert_iterator3<Container> backinserter3(...
[4 replies] Last: What is exactly wrong (by firix)
May 2011 Pages: 1... 29303132
  Archived months: [apr2011] [jun2011]

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