General C++ Programming - November 2010

dynamic array problem
 
This code is a function inside my FIR filter class, not the full code. void clock() { ifstream storedFreq("stored_f_sf.txt"); storedFreq>>f1; sto...
[11 replies] Last: Solved moooce was correct in saying isn't for(double i=0;i<=f1;i... (by tommysmyth)
Quadratic solver - fail
 
Please help me. This is my code: #include<iostream> #include<math.h> using namespace std; double a; double b; double c; double top; double top2; ...
[7 replies] Last: Also, global variables are considered as a bad style (for good reasons... (by JoR)
Function that checks if the answers is valid
 
Basically I need some advice or walk through on trying to change this program I made up. The original is this one here #include <iostream> #include <cctype> ...
[no replies]
C++ CLI Wrapper for C# library
 
Hi All, I am newbiew in C++/CLI. I am using C++/CLI to create a wrapper for a managed library. I almost successfull in creating it. This is how it works....
[1 reply] : Using a refernce: int GetInfo(MyStruct& struct_out); (by JoR)
by Enickx
Problems writing to .dat file using fputs on Mac
 
Before you ask, this is part of an assignment I have to do for class. That said, this is only a small portion of the assignment that I am having trouble with. T...
[no replies]
Array
 
I have an array of numbers and i have to find lowest and highest and drop them. When i display the numbers on my output screen it has to display HIGH for highes...
[5 replies] Last: another for loop after you've found the lowest and highest (by quirkyusername)
by Oiyfae
Confused on what to do
 
A particular talent competition has five judges, each of whom awards a score between 0 and 10 to each performer. Fractional scores, such as 8.3, are allowed. A ...
[1 reply] : The scores should be passed as parameters to calcScore. calcScore is ... (by kbw)
debugger issues!!
 
I have several breakpoints in my program and breakpoints are enabled and set to always break, but when I try to debug it skips over every single breakpoint and ...
[1 reply] : It depends ... What environment are you using? (by kbw)
operator overloading
 
Ok so I am pretty new to programming and as you will see It does not agree with me too well. I have written this code that is supposed to ooutput the informati...
[1 reply] : The function should be deined as: ostream& operator<<(ostream& os, ... (by kbw)
by toks
strcat function error
 
Hello, i have 2 strings, str1 and str2, and i use the strcat() function : strcat(str1 , str2); but i receive the error : error: cannot convert ...
[3 replies] Last: In case you want strcat again try below strcat(const_cast<char *>(s... (by sohguanh)
by Kiana
Generating Combinations & Permutations
 
Basically I would like to, out of a string, generate all permutations of all possible combinations. For example, "1234" would generate: 1, 2, 3, 4, 12, 13...
[1 reply] : I think you have something quite close but not exact fit. http://ww... (by sohguanh)
by jamort
Problem with SDL(blieved to be in classes)
 
Hi, I have been working with SDL for a little while and all of a sudden I'm encountering this problem.. obj\Debug\Application.o||In function `Application':| ...
[2 replies] Last: okay.. I tried that andd... It works! I'll have to remember this incas... (by jamort)
Chaning endian when reading/writing binary?
 
Right now I have a program that takes data from a machine and stores it into a binary file on the fly so that I won't run out of memory and the buffer on the ma...
[no replies]
Priority Queue
 
I'm having some trouble with priority queues. I am trying to store a name and time-stamp into a priority queue. For example: (Bob, timestamp), (Carol,...
[1 reply] : I'd say yes, use a struct\class of some type and push that into the qu... (by Computergeek01)
protect data member of public base class
 
Is there a way to protect a data member of a public base class from use by users of the derived class? Some of the data members of the base should be publicly ...
[6 replies] Last: Now there's an idea, a derived class from the base that copies the dat... (by Computergeek01)
Basic Class question
 
This piece of code was used in one of my teachers examples, but there was no comment to explain what it does. void Date::displayDateFormat1() const { ...
[4 replies] Last: Thanks for the visual. (by kraigballa)
C++ double to string pointer
 
Hi, I have a C++ code having 2 pointers : char *strPtr; double *dblPtr; These have got to be in the code. I cannot replace them with anything. I am...
[2 replies] Last: Thanks firedraco. For 1 - I understand you are suggesting : std:... (by sinpeak)
by flide
Non Deterministic Finite Automata implementation
 
Hello friends, I designed few classes to simulate any DFA and it runs fine, now I want to do the same for a NDFA. The major problem that arises with it is th...
[6 replies] Last: Not to bump a dead thread but the idea here is that once you observe t... (by Computergeek01)
by kretos
j'ais besoin du l'aide et merci
 
je doi ecrire ce program on c++ slt ecrire est me donner and merci merci Les clients d’une banque possèdent des comptes identifiées par un RIB (Relevé ...
[5 replies] Last: So, you have "a friend" who needs some help? Tell your "friend" to beg... (by filipe)
by Rodgex
Love Code
 
I'm trying to write a programme which will implement the childish 'x loves y' game which is used to find the compatibility between two people. Basically, you...
[1 reply] : for(i=0; i<=n; i++) //array goes from 0 to n-1 (by ne555)
November 2010 Pages: 123... 21
  Archived months: [oct2010] [dec2010]

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