General C++ Programming - May 2012 (Page 41)

Help with Program
 
I am making a GUI program in Visual Studio C++ 2008. I have an image file that may help out in solv...
[no replies]
c++ vectors vs dynammically allocated arrays
 
What's the pros/cons b/t the two.
[3 replies] Last: Yea, I used Vectors for my Sieve of Eratosthenes prime generator progr... (by Whovian)
Can someone tell me what's wrong with my prgoram :(
 
#include <iostream> #include <iomanip> using namespace std; int main() { int acc...
[10 replies] Last: except not maths.h, math.h (by Echo773)
Can someone tell me why this wont work?
 
This code is designed to let users create their own estimates for pricing and for some reason, the g...
[11 replies] Last: solved changed grandTotal == to = (by Echo773)
by codder
Extract keys from a string
 
Hello, Supposing to have this string: std::string str = "Func(123.6,6565.3,342.2,76.04)" How can I...
[1 reply] : This is by no means a finished solution, but this is more than enough ... (by clanmjc)
the number of vowels (a,e,o) in the off diagonal of the array
 
This question is mainly based on Block II – Unit 1 and it tests your ability to work with arrays. ...
[2 replies] Last: yes (by enigmaticady)
by julng
sorting using strcmp alphabetically
 
Hi guys, I am stuck in sorting the string list. THe output i want is to sort the strings alphabet...
[9 replies] Last: > I am stuck in sorting the string list. Why can't you just use std... (by JLBorges)
Sorting Algorithms Query
 
Is there a way we can directly use sorting algorithms in our programs? STL has sort() function whic...
[5 replies] Last: The standard algorithms library has std::sort() and std::stable_sor... (by JLBorges)
Enumerations: Where to declare them?
 
Hello! I am yet another one of those fools who is trying to learn enough C++ in there spare time ...
[2 replies] Last: Thats brilliant! Thank you very much cire! (by Swizzler)
diamond problem - or not
 
Hello all, I have been thinking about this and I think I need some help. I have the following situa...
[5 replies] Last: @clanmjc: Yes, that is my current hierarchy. I also thought about this... (by Agent Smith)
by Mannah
Classes with overloading operators
 
#ifndef matrix_h #define matrix_h #include <iostream> using namespace std; class Matrix { ...
[2 replies] Last: The code as given does not compile - there are quie a few syntax erro... (by guestgulkan)
Loop will not stop?
 
My break; isn't ending the for statement. User should only get 3 choices but they get to input more ...
[1 reply] : The loop only iterates 3 times. It may seem like more if you call the... (by cire)
dynamically allocated single vars/arrays
 
Hi, I am confused as why there are two ways to dynamically alllocate memory: int size = 12; int *...
[3 replies] Last: As noted: undefined behavior: anything at all may happen, now or lat... (by cire)
Problem with 'switch'
 
I am currently writing a simple program for my C++ class. It's almost done, but I'm having some trou...
[13 replies] Last: You might change line 66 to studentInfo.open("studentInfo.dat", ios... (by cire)
I am so close! ( i think....)
 
Hey everyone! I am working on a project and I am sooo close, or so I think, to being done. I am ha...
[2 replies] Last: You just needed to calculate the four different values and save them. ... (by histrungalot)
Initializing size of hash table
 
If I know how many items are going to need to go in my hash table, how could I initialize it to a si...
[1 reply] : Multiply the maximum expected number of elements by 1.5, and then roun... (by JLBorges)
Out of range at memory location
 
I have to read in two names from a text file and change each letter to its corresponding number valu...
[6 replies] Last: Never mind, I fixed it. I also made it more efficient. Instead of repl... (by rasen58)
Help creating this algorithm please?
 
I'm working on a hash function that gives a given string an "ID" by mapping that string to a key. Th...
[1 reply] : The first trick is to notice that you are doing the same thing over an... (by Duthomhas)
Populating Files in a Combo Box
 
I am a beginner. I have a 5 files that is saved on my C drive in a folder. I need to use MFC c++ an...
[no replies]
May 2012 Pages: 1... 394041
  Archived months: [apr2012] [jun2012]

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