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

Stuck on Final bit of for looping code
 
Hello just looking for a little bit of help to finish my code. I have it up and running the only problem is my for looping. I've tried many ways to figure it ou...
[3 replies] Last: thats cool, and if those 3 work thats good. but for this one.. ... (by closed account zwA4jE8b)
Vector contains
 
I'm trying to look at 2 vectors of strings, we'll call them A and B. For each element in B, I want to check if that element is also in A. If that element is not...
[3 replies] Last: I specifically replied to this thread... I wonder who deleted my respo... (by Duthomhas)
recursion
 
If I'm wanting the integer returned from a function call in a variable to be used in a different function call.. for example char xchar; int intNum; int w...
[7 replies] Last: yup (by camouser)
Square Root Problem
 
Hello, I am building a program that calculates the square root of a user imputed number with a given algorithum, then it does the cmath sqrt and shows the diffe...
[11 replies] Last: It took me a while to realize but if you remove the for loop completel... (by closed account zwA4jE8b)
Please Help Me Condense A Small Piece Of Code
 
i just finished a fairly large program, and now im trying to condense certain parts down (if possible) I have this at the top of my code... struct Songs so...
[9 replies] Last: HA (by quirkyusername)
Undeclared Identifier
 
I am trying to get this example from my book to work: // Passing by Value Week 5.cpp : Defines the entry point for the console application. // A futile attem...
[3 replies] Last: Thank you for the info. The reason they are the fancy quotes is that I... (by kdog254)
check for memory leaks
 
How can i check the memory leaks over the terminal by use valgrind. does anybody know the command for checking that. thanks for helping me.
[1 reply] : Use the same command line as you do to run the programme, with "valgri... (by Moschops)
Variable-Sized Array
 
Is there a way to declare a two-dimensional array with two variables? I need to be able to pass the array back and forth between functions. I've tried using v...
[5 replies] Last: The reason being they're different tokens. (by filipe)
Polymorphism and Iterators
 
Hello everybody, I have a practice exam for which we don't get solutions for and wanted to see if someone could try answering one of the questions. Thank you ...
[2 replies] Last: The function should create an iterator for the passed bag object and t... (by webJose)
capitalization problem
 
Hello! I'm using the code below: void nameFormat(info list ) { int i, first, letterNum; //change all names to lower case for (i = 0; i < MAX_...
[4 replies] Last: Hey! That fixed the original code. I don't know how many times I mis... (by voltron010)
Quick Question On Constructors
 
Can I call a member method in a constructor? Here's a quick example that shows what I mean if you don't already: struct STRUCT { STRUCT( void ) {...
[8 replies] Last: Thanks, I'll check it out! (by kooth)
by Adidas
check "fwrite" return value
 
my code is fwrite(Head , sizeof(Student) , 1 , dat) How I check if my allocation succeeded/fail? Thanks in advance 4 all of you :)
[9 replies] Last: It's just a binary text file right? Then yes, you can open it in anoth... (by anonymous23323124)
C++ locale name list
 
Hi I am using visual studio on win xp. I wants to get locale names list for entire region supported by c++. Is there any way using c++ I can do it. Any idea...
[1 reply] : Here you go: http://msdn.microsoft.com/en-us/library/dd318693.aspx (by savavampir)
got error for undefined reference
 
Hi, I just wrote a program for card war games. but when i try to compile it , it return error for Undefined reference Here is my code, i got five file for my...
[5 replies] Last: From line 98 in your original code, you have this: Deck& Deck:: oper... (by anonymous23323124)
Function Referenced from Function: Symbol not Found
 
I'm getting this error from Xcode: "digitsIn(int)", referenced from: binaryToDecimal(int)in Binary Conversion.o binaryToDecimal(int)in Binary Co...
[4 replies] Last: So I just add a reference to that .cpp file, right? To clarify, you ... (by anonymous23323124)
help!! asap (dynamic arrays)
 
so I am writing a program to prompt the user how many values they would like to input then take those inputs and sort them low to high find average and finally ...
[10 replies] Last: no problem man. pm me if you ever need anymore help (by metl wolf)
do-while loop problem
 
Hello this is my first forum on this website. Am looking for a little help on my code. Am trying to validate input using the do-while loop but I can't seem to m...
[17 replies] Last: congrats on 420 posts btw =P and i edited out that last part of my la... (by metl wolf)
Simple Encryption...
 
Just to try to expand my skills, how basic they might be, I decided to try basic encryption/decryption. This is my start at encryption... And it IS basic. Haha....
[4 replies] Last: @Moschops Thank you very much, that makes a lot of sense. @tejashs An... (by closed account 3872Nwbp)
Emergency Vector Problem?
 
Hey! I'm again having difficulties with vectors. I was really close at one time, however, I am having difficulty with a specific portion of the below code. Unfo...
[3 replies] Last: By my reckoning, if you enter no input (i.e. | both times) you get a ... (by Moschops)
C++ looping through array like numbers
 
hello i would like to know how to loop through an array like numbers. i used to know how to do this, but i forgot, and can't find my project i made it with. ...
[1 reply] : I don't understand how it is supposed to do that. You would need a ton... (by Khaltazar)
April 2011 Pages: 1... 56789... 37
  Archived months: [mar2011] [may2011]

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