General C++ Programming - April 2011 (Page 25)

AHHH RECURSION!!!
 
I'm just learning about recursion in my C++ book and man is it ever confusing, is it going to be 100% necessary for me to master this before moving on? I don't ...
[6 replies] Last: Im also learning recursion. You might know more than me right now but ... (by zeroelement)
highest value in the array
 
I wrote a function that calculates the highest value in the array but I am having trouble using pointers. Here is my code: The errors are double highest = a; a...
[10 replies] Last: You were very close... #include <iostream> using namespace st... (by Mathhead200)
Arrays
 
#include <iostream> using namespace std; int main () { int score ; int total=0; for(int a=0; a<=4; a++) { ...
[16 replies] Last: Run my program though an array, instead of getting input from cin. And... (by Mathhead200)
by Kidk5
PLEASE help!!!
 
I really need some help with this program. Function 1. In statistics, the mode of a set of values is the value that occurs most often or with the greatest ...
[4 replies] Last: Can you pass a pointer to an array to a function? int findMode(int* p... (by closed account D80DSL3A)
Parameter error:
 
I created member variables in the MainFrame class this way I could access them from anywhere: #include "GUI.h" #include <wx/msgdlg.h> #include <wx/filename.h>...
[1 reply] : mainframe.h includes im.h im.h includes mainframe.h In im.h you only ... (by ne555)
by idk
Need some help with I/O File program
 
I am trying to run this simple program below: #include<iostream> #include<fstream> using namespace std; int main(void) { ifstream openFile("d:\fkjk...
[2 replies] Last: Thanks, I will try that. (by idk)
Void logic problems
 
void printNumber(int a){ if(a<10) cout << a <<" "; return; printNumber(a/10); cout <<a/10<<" "; } int main() { //printNu...
[2 replies] Last: C++ doesn't care what you put on a line. What matters is code blocks ... (by Disch)
implement the strncpy function
 
I am having trouble implement the string copy function of c++. I think I have the right idea I'm just don't understand why I'm getting errors. One of my error...
[1 reply] : char *mystrncpy(char *s, const char *t, int n) { int strcmp(const... (by hanst99)
Debug Assertion Error
 
I am trying to read an input file that has single and double quotes. I get an error message that reads: Debug Assertion Error...Expression: (unsigned)(c+1) <=25...
[1 reply] : Some more info, like the relevant source code, would be helpfull. (by mof)
Template class
 
Hi I have this template class but I get a lot of errors in it. 1st error points to the structListItem declaration: template <class LISTITEM> class listI; ...
[3 replies] Last: Hi //listM<LISTITEM>::structListItem<LISTITEM> *currStructList; class... (by ne555)
by Tresky
Misplaced Squares
 
I am trying to have a collection of numbers transfer from a text file into a map inside of the program. I am assigning the color green to the number 0. The t...
[5 replies] Last: Holy Crap!! How did you know to do that?!?! That worked! I am so sorry... (by Tresky)
Link Error
 
Has anyone out there encountered this.... Error 1 error LNK2005: "class _variant_t vtMissing" (?vtMissing@@3V_variant_t@@A) already defined in comsupp.lib(co...
[1 reply] : Sounds like either you are linking your files incorrectly or something... (by firedraco)
Simulate Command Line Arguments
 
Hey folks. I inherited a program that is launched at a command prompt. Arguments are also passed in from the command line. I want to step through the pro...
[2 replies] Last: Thank you firedraco! (by BobInRedondo)
Templates
 
Hi, Is there a way where we can restrict the Templates to be used by only certain number of classes(apart from specialization). Because the we cannot guarant...
[3 replies] Last: Oh I see...... So its a design choice of templates. Got it. Thnx. (by howtechstuffworks)
Quick if statement error
 
I am having some issues that i am sure is just a obvious problem if am missing. Simple if statements but the problem is that it only does the right thing for ch...
[8 replies] Last: It asks for the choice input and it just continues to let the user inp... (by LiverpoolFTW)
Pyramid Help (1,2)
 
* *** ***** ******* Hello Experts I need this output....
[34 replies] Last: i like the way i did it in C# more :) substrings my friends :o (by ascii)
by wayn3
Soft with all library and headers files
 
Hello... I have a problem that is makeing me nervous.. Everytime i want to test a code/program .. i have to search the internet for every header and library nee...
[3 replies] Last: In this case...Thanks for the reply (by wayn3)
Converting from T[][]...[] to T**...*
 
Just for the fun of it, I thought I would implement my own any class. When I finished, everything worked except for any a="Hello World!" The reason it didn'...
[5 replies] Last: For array dimensions, you have to play tricky with templates. For exam... (by Duthomhas)
Finding the average of an array
 
I am having trouble using a pointer in my average function trying to find the average value of the array. Here is my code. #include <iostream> using name...
[2 replies] Last: it worked thanks (by ashworcp)
by Gldnbr
Input character by character?
 
How do I read a text file character by character? I have a text file that includes: abcdefghi I want to make a program that reads that line, character ...
[2 replies] Last: Nevermind, I got it! (by Gldnbr)
April 2011 Pages: 1... 2324252627... 37
  Archived months: [mar2011] [may2011]

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